cancel
Showing results for 
Search instead for 
Did you mean: 

Using ADC with DMA on H7 causes DMA transfer error

MMevo.1
Associate II

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:

https://community.st.com/s/question/0D53W00001HbHIwSAN/stm32h743-i2c-dma-scl-stays-low-after-getting-slave-address-ack

Any Ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
MMevo.1
Associate II

DMA was initialized after ADC and I2C...

After fixing the initilazation order the problem was solved.

Thanks a lot!

View solution in original post

3 REPLIES 3
TDK
Guru

Where is your buffer located?

https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

Also make sure DMA is initialized before I2C.

https://community.st.com/s/question/0D53W00001EzCmCSAV/mxdmainit-order-in-the-mainc-file-generated-by-stm32cubemx-how-to-fix

If you feel a post has answered your question, please click "Accept as Solution".
MMevo.1
Associate II

DMA was initialized after ADC and I2C...

After fixing the initilazation order the problem was solved.

Thanks a lot!