2023-02-28 01:28 PM
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.
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 :)
2023-03-11 12:56 PM
2023-03-11 01:44 PM
Double Interrupts, HT & TC ?
The Cortex-M has a long standing race condition with the NVIC / Peripherals, the processor is pipelined, and the tail-chaining decisions are made quite rapidly.
Reading back the register you've written acts as fencing instruction for the write-buffers. Clear the interrupt early in the handler, not the instant before you exit.
Debugger only? Check BOOT0 is pulled low. Instrument with a UART so you don't need to single step everything. Confirm it is running. Check that you've enabled all required clocks and peripherals, and not reliant on the debugger to do it. Dump RCC registers in the working and non-working states, compare and contrast. Look at other peripheral registers