Hi Alice,
Just to make sure we're on the same page, can you give an example of what is meant by "1-bit SPI NOR Flash"? I'm assuming it means something like a Winbond W25Q128 - a flash chip with a standard 1-bit wide SPI interface. "1-bit SPI NOR Flash" is not a term I normally hear applied to it, and if you google that exact phrase the whole first page of results are just LPC documentation.
It just expects a standard NOR flash organized x8 bits internally, right? I want to make sure we're not starting with false assumptions since there seem to be a whole lot of assumptions in the documentation.
Can you explain what the intended use of the SPI flash recovery mode is? In 6.4.3 it says it can be used to recover a factory image when the internal image is corrupted and says it "...can be implemented during OTA...". Is it intended that this should be a fallback in case some other update method fails? What is imagined to be the OTA process here? Is the OTA bootloader assumed to be provided by the customer?
NXP provides tools to create and sign secure boot images, and the blhost tool for (presumably) factory programming, which I think includes pass-through programming of a SPI NOR flash. (It's not clear to me whether that's for factory programming automation in general, or if it's strictly for the SPI flash recovery mode.) The ROM bootloader provides extensive facilities for validating signed images, but I can't see how to access any of those capabilities in-application for an OTA use case.
So in what situation would the image corruption happen and need recovery by a backup image? Is it intended that the backup image SPI NOR flash be solely devoted to the recovery image? Like the customer designs in an 8-pin flash chip ONLY on the FC3 pins and uses that only for storing the one image?
Table 249 mentions a field for "Start address of external memory" but as far as I can tell gives no further explanation. It's only a 4-bit field. Is this the start address in external memory? External SPI memory isn't mapped into the local memory space so I don't know what other address it could be referring to. Which 4 bits of the address is this? In what documentation is this field explained?
My board (at least the one I'm working on at the moment) can't use FC3 and doesn't have space for a second SPI NOR flash. It has one 256 Mbit flash on the HSSPI port, which I think is the one that would make the most sense for anyone's first choice to connect a SPI flash memory since it's the SPI peripheral most likely to need high bandwidth.
So if I can't use the ROM bootloader's SPI recovery mode, is there some way to feed it an SB2.1 image in-application? Or any way to access the validation functions to avoid having to replicate all of that functionality in my own in-application bootloader?
Thanks,
Scott