2022-01-05 07:40 AM
Hello,
I am trying to use circular DMA to transfer data from ADC1 into a buffer using CubeMX-generated code to configure the ADC and DMA. The DMA stream encounters a transfer error on transferring the first item.
The device is an STM32H743.
Using a debugger it can be seen that the program excute HAL_ADC_ConvCpltCallback()
and right after it gets to HAL_ADC_ErrorCallback()
Atatched are captures of the CubeMX configurations.
I assumes that it is related to anouther DMA isue that I am experincing with the I2C:
Any Ideas?
Solved! Go to Solution.
2022-01-06 12:18 AM
DMA was initialized after ADC and I2C...
After fixing the initilazation order the problem was solved.
Thanks a lot!
2022-01-05 07:54 AM
Where is your buffer located?
https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
2022-01-05 08:41 AM
Also make sure DMA is initialized before I2C.
2022-01-06 12:18 AM
DMA was initialized after ADC and I2C...
After fixing the initilazation order the problem was solved.
Thanks a lot!