Skip to main content
PHoll.1
Associate
August 25, 2020
Question

STM32F746 ADC DMA buffer overrun when TouchGFX starts

  • August 25, 2020
  • 3 replies
  • 1119 views

I use a stm32f746 disco board and try to set the adc at a sample rate of 1.8 MPS. The dma transfers starts correct (I toggle a gpio pin in the convert call back to check the samplerate). I start the adc dma before touchGFX is started but as soon touchgfx is started the adc raises a overrun error and the dma transfer stops. I am also not able to restart again. Does any one have experienced such behaviour?

The adc1 dma is configured circular DMA2 stream 4 clock is 108 Mhz div = 4 12 bits 15 cycles gives 1.8 Mbps

This topic has been closed for replies.

3 replies

TDK
August 25, 2020

1.8 Msps is pretty fast. Might just be too much to handle. Does it occur if you reduce the sample rate? Using the FIFO instead of direct mode can probably help a bit.

The reference manuals describes what is needed to recover from an overrun error.

"If you feel a post has answered your question, please click ""Accept as Solution""."
PHoll.1
PHoll.1Author
Associate
August 25, 2020

Slowing down the speed indeed stops the overruns, but the original code comes from a STM32F429 I would expect a F746 to be faster although there emWin was used for GUI and not touchgfx. Probebly the dma from the display is interfering. WIll try if fifo is a solution.

PHoll.1
PHoll.1Author
Associate
August 26, 2020

Fifo does not help, the max speed I can get without overrun is 1.46 Msps it is a bit of a disappointment. It is also hard to debug to see which part of touchgfx is causing the problem, or is it structural. I was looking for some option to "slow down" touchgfx but for now don't see them. Without touchgfx I can get speeds up to 3.6 Msps using all 3 adc's.