SPIFI code execution on LPCXpresso54608

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

SPIFI code execution on LPCXpresso54608

Jump to solution
1,369 Views
alexis_marquet
Contributor II

HI, I'm having trouble running code from spifi flash on the LPCXpresso546XX, specifically the 54608 version. When placing code in internal flash, the program runs fine, but when i added *(.text) -> Board flash, the program hardfaults with a IBUSERR.

So far the resources i have found about this were mostly about the SPIFI driver used to program the flash with the debugger. I am wondering what (if any) configuration of the SPIFI is needed in order to run the code from external flash on the development board.

I'd be happy to supply more info as needed, my only idea so far is that maybe there needs to be some configuration about timing when using the SPIFI device mapped to AHB bus?

Hope you can help me,

Best regards,

Alexis Marquet

PS: The EmWin tools/ appwizard is not up to the last version on your website, which is still giving 6.10f while last version is 6.14a: ROM usage of Appwizard - emWin related - SEGGER - Forum 

Labels (1)
Tags (3)
1 Solution
1,306 Views
alexis_marquet
Contributor II

I managed to solve my problem. SPIFI was not put in memory mode. for others that might have the same problem, i had to add SPIFI_SetMemoryCommand before the memory could be accessed trough AHB after setting up the peripheral. you can find the example in the SDK - flash_component_nor_spifi. the difference with the example is that the read function actually resets the memory mode after reading it using memcpy, and we don't want that.

View solution in original post

0 Kudos
Reply
2 Replies
1,307 Views
alexis_marquet
Contributor II

I managed to solve my problem. SPIFI was not put in memory mode. for others that might have the same problem, i had to add SPIFI_SetMemoryCommand before the memory could be accessed trough AHB after setting up the peripheral. you can find the example in the SDK - flash_component_nor_spifi. the difference with the example is that the read function actually resets the memory mode after reading it using memcpy, and we don't want that.

0 Kudos
Reply
1,306 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexis,

You can also find spifi demo under SDK,download from https://mcuxpresso.nxp.com/en/select       

pastedImage_1.png

Regards,

Alice