Skip to main content
Araknai
Visitor II
February 28, 2022
Solved

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.

  • February 28, 2022
  • 1 reply
  • 679 views

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?

This topic has been closed for replies.
Best answer by Tesla DeLorean

Watch that looking at peripheral registers in the debugger view can touch/change states, they are not memory but tied to other synchronous logic. Assume the debugger is invasive.

QSPI Flash typically can only write up to whole sectors, at sector aligned addresses. ie Micron parts writing 256 bytes at a time maximum.

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
February 28, 2022

Watch that looking at peripheral registers in the debugger view can touch/change states, they are not memory but tied to other synchronous logic. Assume the debugger is invasive.

QSPI Flash typically can only write up to whole sectors, at sector aligned addresses. ie Micron parts writing 256 bytes at a time maximum.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..