2023-05-09 06:08 PM - edited 2023-11-20 05:54 AM
Using an STM32H757-EVAL (don't use CM4) with CubeMX. Configured my ADC1 as follows:
DMA is:
Start the process as follows (both calls return HAL_OK):
I allow the code to run for 10 seconds and break. The m_hv_status_values buffer still has the initial values:
My expectation is that after the call to the HAL_ADC_Start_DMA, the ADC should scan all 6 channels continuously and put resulting conversions into the m_hv_status_values circular buffer sequentially. Any suggestions would be appreciated.
Gil
2023-05-09 07:44 PM
The analog ADC IP is a fast changeling among the STM32 families, what is learnt from one may not work on another one. Some have list sequence of channels, some have injected channels, some have differential channels, some have one trigger input pin or many.
If you are in luck maybe there is an ADC example for the corresponding Nucleo board in Cube SW project. Otherwise use a debug probe, put a breakpoint just before SW activating the conversion, look at the ADC/DMA HW register values, possibly modify them, and let the code kick in the ADC, put a second breakpoint after 100 msec SW delay and check the result. Rinse and repeat.
Check the DR is non zero (maybe the DMA programming is wrong). Rinse and repeat and let us know how long did it take overall to get the job done for our community info.
2023-05-10 01:12 PM - edited 2023-11-20 05:54 AM
Thanks S.Ma, it works now. I changed the RAM location from this:
To this:
Not sure why this change is needed. If you understand why this is needed, please let me know.
Gil