Can XECC write to serial NOR flash?
2026-02-09
I'm not sure yet! But, I think the answer is "no."
XECC, the external (X) error correction code (ECC) controller, sits in front of some external memory interfaces. It's on the AXI bus. When you read external memory, XECC will decode ECCs and check the memory contents, making sure data hasn't been corrupted. Similarly, when you write to external memory, XECC will encode ECCs and include them in the written data.
There are dedicated XECCs in front of both FlexSPI controllers on the IMXRT11xx MCUs. Each FlexSPI supports AXI access through an AHB converter. With this, you can access flash as if it were memory. Read access towards serial NOR flash generally works; that's how imxrt-rt copies instructions and data into TCM / RAM. If XECC were enabled, and if the ECCs were already in flash, I'd expect reads towards FlexSPI to automatically decode the ECCs.
But writes? I heard writes won't work. I haven't tested this myself.
If the write pathway doesn't work, it doesn't seem we can use XECC as our encoder. We'll need another way to encode ECCs in external NOR flash to satisfy the decoder.