LPC546xx SPIFI dual section XIP

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

LPC546xx SPIFI dual section XIP

1,432 Views
pge
Contributor I

Hello,

I plan to use a LPC546xx in a new design where I need an external Flash to store firmware.

I need two Flash section to be able to perform safe OTA firmware update in ping-pong mode. One section is updated while code is executed from the other section. 

Do you know if SPIFI can be used for such scenario ?

In the datasheet and user manual I can read :

SPIFI has two operational modes:

1. Memory Mode - whereby the contents of the FLASH are memory mapped in the chip.

2. Command Mode - whereby the user can manually construct command sequences for the flash.

SPIFI cannot switch over from Memory Mode to Command mode and vice versa without writing 1 to the RESET bit in the SPIFI Status Register and polling until it is cleared by hardware to ensure that the current mode has been aborted.

I understand that I cannot execute code from one section while updating another section. Is that correct ?

I also read :

The SPIFI on the LPC546xx has a reduced cache for accesses to the serial flash region of the memory map, so direct execution of code from external SPI flash memory is not recommended.

And somewhere else :

Provides XIP (execute in place) feature to execute code directly from serial flash.

Which statement is correct ?

Thanks in advance for any help

PGE

Labels (2)
Tags (3)
0 Kudos
3 Replies

970 Views
jeremyzhou
NXP Employee
NXP Employee

Hi PGE PGE,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
1) I understand that I cannot execute code from one section while updating another section. Is that correct ?
    Yes, it's correct.
2) Which statement is correct ?
     In my opinion, the last statement exemplifies the general feature of the SPIFI module, however the first two statements demonstrate the specific feature of the SPIFI module in the LPC546xx.
Hope this is clear.
Have a great day,

TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

970 Views
pge
Contributor I

Thanks for your reply. The answer for point 2 is not clear. Is it ok (recommended) to run code from SPIFI or not ?

0 Kudos

970 Views
jeremyzhou
NXP Employee
NXP Employee

Hi pge,

In the my opinion, the LPC54608 can run the code from the external SPI flash memory as if it was in the internal flash, however the performance is not very good, and this scenario is not recommended.

Hope this is clear.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------