nxp: mcux: flexspi: flash write interrupted by XIP #83231
Labels
area: Flash
bug
The issue is a bug, or the PR is fixing a bug
platform: NXP Drivers
NXP Semiconductors, drivers
platform: NXP
NXP
Describe the bug
Our MCU is an MIMXRT1176; we have a MT25QU01GBBB flash on our system.
We realized our FlexSPI write is sometimes slow, sometimes causes incorrect 0xFF regions and sometimes crashes the entire system.
When analyzing our Flash with a Logic Analyzer, we encountered the following:
Explanation:
0x21
command, which is a "4k sector erase command".0x05
. Note that the response to this command comes on DATA1, so we cannot see it. But it should take several milliseconds, so it should finish way in the future.0x6c
(read) commands in between, which do not get completed, though. They get interrupted by the0x05
(check state) commands.Issuing read commands while a previous erase/program command is unfinished puts the entire flash into undefined behavior and must be avoided at any cost, which the Zephyr team is probably already aware, as interrupts already get deactivated during this time and the function itself is already moved to ITCM. However, it seems that some detail was missed.
To Reproduce
Sadly hard to reproduce on official boards. It should be quite obvious when probed with a logic analyzer, but the official 1176-EVK/EVKB boards do not expose those pins (to my knowledge).
Expected behavior
No XIP commands should run while Flash Writes happen.
Impact
Random crashes, lost data, decreased performance, general system stability problems
Environment:
The text was updated successfully, but these errors were encountered: