lpc4357 fw upgrade

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

lpc4357 fw upgrade

489 次查看
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
标签 (1)
0 项奖励
回复
3 回复数

460 次查看
lpcware
NXP Employee
NXP Employee
bump
0 项奖励
回复

460 次查看
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 项奖励
回复

460 次查看
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 项奖励
回复