lpc4357 fw upgrade

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

lpc4357 fw upgrade

344 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pgeloso on Thu Mar 03 10:30:30 MST 2016
Hi,
I'd like upgrade the fw of M4 core from m0 core.
The M4 code is in FlashA bank while m0 code is in FlashB bank.

From m0 code, before erasing sector 0, I should stop M4 core in order to avoid an M4 crash.
How should I proceed?

Thanks
Bye
Labels (1)
0 Kudos
Reply
3 Replies

315 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

315 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pgeloso on Thu Mar 10 02:54:21 MST 2016
Thank you "bavarian" for the suggestions.

I'll try with a core reset after the M4 upgrade.

I agree, the upgrade in this way is not a safe operation.
I guess it's better to place a bootloader code in spifi-flash that can also run the upgrade. In this way, if something goes wrong during the upgrade of the standard flash, the device will stay in "upgrade mode".

Thanks
Bye
Pietro
0 Kudos
Reply

315 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Wed Mar 09 06:32:00 MST 2016
Stopping the M4 is easy, but you need to prevent that it starts running again. This means you need to disable all interrupts except the one from the M0APP. Then you can use IAP calls to re-program flash bank #A and then issue an interrupt to the M4. But then the interrupt service function needs to be on a predefined address so that the interrupt request goes to right place. In the ISR you set the PC to the address of the new firmware the M4 should continue from

I see various other ways of handling that, you could also work with a core reset which drives the whole chip through a reset.

One thing to consider is for sure the reliability of the update process. What happens if something goes wrong during erase or program? Ar you still able to recover?

Regards,
NXP Support Team
0 Kudos
Reply