LPC55S69 SPI flash recovery

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S69 SPI flash recovery

1,137 Views
plong44
Contributor II

I have a question about the LPC55S69's ROM bootloader, particularly the SPI flash recovery feature. From reading the UM it looks like you can hook a SPI flash chip up to Flexcomm3 (Table 171), invalidate the internal image, and during the next reboot the BL will detect that the image is invalid and copy the external image (assuming it is an SB2.1 format) over the old image. What I could not figure out is where in the external flash you store the SB2.1 file? At address 0?

Also are there any reason not to use this recovery feature as a means of deploying a field update?

0 Kudos
4 Replies

1,090 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Paul
The LPC55S69 flash recovery feature is for 1bit SPI flash, it doesn't have mirror address in MCU memory map.
SPIFI flash address is mirrored to MCU memory map but not for spi flash.
For SPI flash, its address is included in SPI command. normally it starts from 0. You need to check your SPI flash manual to make sure of it.

 

Best Regards

Jun Zhang

0 Kudos

1,105 Views
plong44
Contributor II

Hi Jun,

Thanks for replying. Is there a register (or a word in the CFPA/CMPA/etc) in the LPC55S69 that tells the bootloader where to start reading the recovery SB2.1 image from the SPI flash chip? Or is it assumed to be at a particular address in the SPI flash chip?

 

Thanks,

Paul

0 Kudos

1,113 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

 SPI flash recovery feature is used if LPC55S69 doesn’t pass image authentication check (if secure boot enabled) and CRC check (secure boot not enabled). If the internal image is damaged, it can’t pass validation. In this case SPI flash recovery feature can be enabled. The invalid image is hooked by boot not user. If secure boot is enabled, the image stored in 1bit-spi flash must be SB2.1 format. You need check your SPI flash user manual of how to read/write.

 

SPI flash recovery feature is a feature of LPC55S69 1B device, user decides use it or not.

if the internal flash image is deemed invalid, the device checks the SPI_RECOVERY_BOOT_EN (bits 3:0) in protected flash SPI_FLASH_CFG (0x9E404) to determine if SPI flash recovery is enabled. If SPI flash recovery is enabled, the boot ROM tests SEC_BOOT_EN (bits 31:30) in protected flash SECURE_BOOT_CFG (0x9E41C).

 

Have a nice day

Jun Zhang

0 Kudos

1,002 Views
awseiger
Contributor I

Hello,

Where can I find what to write into SPI_RECOVERY_BOOT_EN to configure the SPI recovery boot?

Thank you,

Alex

0 Kudos