STM32H7, MDMA IRQ double hit... and working only with debugger attached.
Hello,
I configured the following ADC flow:
ADC3 => DMA2 => SRAM => MDMA => DTCM
Everything was working well using the MDMA in single buffer transfer mode. In each MDMA interrupt I was reconfiguring the MDMA channel to get ready for the next DMA2 transfer complete IRQ.
Next step was to configure the MDMA in linked mode. The idea is to use a single node pointing on itself, to reconfigure the MDMA automatically at the end of each buffer transfert.
- Program compiled in debug mode, started with a debug session: it looks to work, but every MDMA IRQ is immediately followed by a second entrance in the interrupt routine (with all IRQ flags = 0). I was thinking about something like that link but the MDMA shares the core clock (?) and the problem persists even using 10 nops after the flag clear.
- The same program, started by itself: I don't have any MDMA interrupt. I'm sure the problem is the MDMA because everything was ok before using it.
I/D caches disabled. Optimization level don't change the behavior.
I've spent hours on this problem, I didn't found any relevant information on the web.
Any ideas will be strongly appreciated :)