Skip to main content
16 events
when toggle format what by license comment
Apr 22, 2017 at 10:27 history edited Marco CC BY-SA 3.0
deleted 43 characters in body
Apr 22, 2017 at 10:26 vote accept Marco
Apr 22, 2017 at 10:25 answer added Marco timeline score: 1
Apr 14, 2017 at 16:15 history edited Marco CC BY-SA 3.0
added 33 characters in body
Apr 14, 2017 at 15:48 history edited Marco CC BY-SA 3.0
I have updated the code with the modifications I proposed before. Now I get a stable value but is very low. What I am doing is selecting different channels for each function or is it reading all the time the same channel?
Apr 14, 2017 at 9:28 comment added ammar.cma Can you post the whole code? Like everything?
Apr 14, 2017 at 9:27 comment added Marco @ammar.cma because within those other ADC read functions I use the reference to put in scale the measured values before sending them through the UART.
Apr 14, 2017 at 9:25 comment added ammar.cma Why are you passing a reference value to another read ADC function?
Apr 14, 2017 at 9:25 comment added ammar.cma The best way to know that is if you debug the code line by line.
Apr 14, 2017 at 9:20 comment added Marco @ammar.cma whenever the code executes HAL_ADC_GetValue(&hadc); it should get the value, but how can I tell from which ADC channel it is taking it?
Apr 14, 2017 at 9:17 comment added Marco @ammar.cma, I'm passing uint16_t volt1 which is a reference value measured by volt1 = readv1();.
Apr 14, 2017 at 9:16 comment added ammar.cma @brhans He does not have to start and stop a conversion; he is using continuous conversion mode. So whenever he pulls Get_value ; he should get it in theory.
Apr 14, 2017 at 9:14 comment added ammar.cma readv2(volt1)? You're passing what argument exactly?
Apr 14, 2017 at 9:08 comment added brhans In your 1st code snippet, you're not actually performing an A2D conversion - so not reality surprising you're seeing the same value. The 2nd snippet looks like it would do the job.
Apr 14, 2017 at 8:51 review First posts
Apr 14, 2017 at 9:14
Apr 14, 2017 at 8:50 history asked Marco CC BY-SA 3.0