2023-10-09 03:15 AM
I'm using an STM32H563. Setup to get ADC captures into a buffer using DMA in circular mode.
I have TIM1 triggering an ADC1 conversion of two channels. And a buffer with 16 readings using DMA. The GPDMA is set in Standard Request Mode and Circular enabled. To debug I have a counter in HAL_ADC_ConvCpltCallback to see how many times it is called.
The buffer of 16 values is populated with values, and I get a call to the callback function once. But it then stops, I don't get any more call backs.
I was expecting the circular mode to give a trigger once the buffer was full, but then loop around and continue filling the buffer a second and third time, each time giving a callback.
I can see that the init to set circular mode are being added to the stm32h5xx_hal_msp.c but don't seem to be doing what I expect.
I've attached a sample project and IOC file.
Solved! Go to Solution.
2023-10-09 06:02 AM
Hello @iguffick2 ,
In the ADC parameter setting, can you try by enabling the DMA Countinious Requests ?
Best regards,
Simon
2023-10-09 06:02 AM
Hello @iguffick2 ,
In the ADC parameter setting, can you try by enabling the DMA Countinious Requests ?
Best regards,
Simon
2023-10-10 01:02 AM
That's all that it needed. ADC values now populating with DMA and giving callback interrupts.
Thank you.