STM32H7A3ZITQ_LQFP144 QSPI Timeout Issue
Hello,
I am using the STM32H7A3ZITQ and have encountered an issue while controlling the MT25QL128ABA1ESESF0IT flash memory during the flash read process. I am operating in QSPI mode. During extended aging evaluations, a 5-second timeout (a busy flag is not cleared) intermittently occurs in the LL_OSPI_Receive() function.
Since this issue occurs randomly, I tried to force the conditions to analyze the problem. I discovered that in debug mode, if I set a breakpoint and step over the function, the problem occurs 100% of the time.
Interestingly, if I add a variable inside the read function, the issue that occurs 100% of the time disappears. When examining the assembly code, I found that adding a volatile variable generates two additional assembly instructions, leading to a delay that seems to resolve the issue. However, attempting to induce a similar delay using asm("nop") did not resolve the issue.
I confirmed that adding a variable resolves the problem. Adding one, two, up to four variables resolves the issue, but adding five variables causes the issue to reappear. This leads me to believe that the problem might be due to something other than a timing issue.
I would appreciate any assistance you can provide regarding this phenomenon.
Thank you.



