2024-04-11 12:44 AM
So,I set my DMA at circular mode ,adc at continuous mode ,but when I debug the timing to get into HAL_ADC_ConvHalfCpltCallback(),I found the buffer is already fulled,can someone tell me what's going on?
Solved! Go to Solution.
2024-04-11 06:14 AM - edited 2024-04-11 06:15 AM
Hello,
Because it's not possible to stop ADC while debugging. See this thread.
The only solution I see, is to trigger the ADC with a timer and freeze its counting when the CPU is halted. This is done by writing to DBGMCU_APB2_FZ register:
See this thread.
Hope it helps.
2024-04-11 06:14 AM - edited 2024-04-11 06:15 AM
Hello,
Because it's not possible to stop ADC while debugging. See this thread.
The only solution I see, is to trigger the ADC with a timer and freeze its counting when the CPU is halted. This is done by writing to DBGMCU_APB2_FZ register:
See this thread.
Hope it helps.