2020-08-25 12:34 AM
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
2020-08-25 06:22 AM
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.
2020-08-25 07:24 AM
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.
2020-08-26 05:24 AM
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.