2025-01-14 10:53 AM - edited 2025-01-14 11:44 AM
2025-01-14 01:24 PM
Hello,
Please elaborate more and provide more details on the issue.
See Tips on posting.
2025-01-14 02:20 PM
I tried to "measure" ADC delay for Measureing 3 Channels by using TIM2 configured for 500 ms per Pariod and used periodelapsed-callback to set the LED pin and call HAL_ADC_Start_DMA for 3 words.
The End would be HAL_ADC_ConvCplt_Callback whihc would reset the led pin.
Expected result : nothing to see because the time the LED would be on would only show up on the oscilloscope.
But i got LED slowly toggle between on and off, at app. 1 Hz.
That would insinuate exzessive ADC conversion time but it was only a measurement error: I may only switch on the LED (and start the next ADC DMA) when the LED was off at the end of a TIM2 period so I tried to get rid of the posting.
However, after changing the code the LED would never extinguish.
Current verdict:
I'm still not smart enough to get the ADC going with CubeIDE (which has a very shallow learning curve)
or I've got a STM32F411CEU6 with dead ADC, but nicely workung Timer, GPIO and USB_CDC.
Currently I seeking a program to verify the function of ADC (or DMA).
2025-01-14 02:57 PM
Ok, ADC works.
GND is read as 1, +5V is read as 4095 and Channel supended between 2 x 2k2 reads 2978, give or take.
DMA check is next....