QSPI TCIE self clearing? STM32H743I QSPI peripheral sometimes hangs Writing to external flash via QSPI transmit using MDMA and both MDMA and QSPI interrupts. Sometimes the QSPI peripheral gets hung up indefinitely.
With the ICD I found that sometimes, between the MDMA IRQ Handler - where the QSPI TCIE bit is set, and the QUADSPI_IRQHandler, the TCIE bit is cleared.
But I haven't been able to determine where or how it is being cleared; I've eliminated all locations in code related to the QUADSPI->CR.
1) So the first question is why can't I see where the TCIE bit is being cleared? Or what exactly is doing it.
I recently discovered that my issue goes away by making the QUADSPI IRQ and MDMA IRQ the same priority, while making the MDMA sub priority higher (logically) than the QUADSPI IRQ.
Before: MDMA - priority 14, sub 0, QUADSPI - priority 15, sub 0
After: Both priority 14, MDMA sub 0, QUADSPI sub 1
2) Second question is how is this priority change solving the problem?