IAP Reprogram Sector 0 on LPC15xx

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

IAP Reprogram Sector 0 on LPC15xx

Jump to solution
559 Views
gato
Contributor I

Hi,

I'm currently porting an secondary bootloader to the lpc15xx platform. Part of this bootloader is, that it may update itself remotely. But for the LPC15xx I read in UM10736.pdf on Chapter 34.9.3 (Page 575), that "The boot sector can not be erased by this command.".

A first test showed, that an erase of Sector 0 returned with SUCCESS, but without actually erasing the contents.

I'm wodering however, is there a way to erase Sector 0 from within the running software?

 

Thank you, sincerely

tom

Labels (1)
0 Kudos
1 Solution
545 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @gato 

"

I'm wondering however, is there a way to erase Sector 0 from within the running software?

"

Sorry no, you can enter ISP mode or other program/debug tools to erase.

 

BR

Alice

View solution in original post

2 Replies
538 Views
frank_m
Senior Contributor III

> Part of this bootloader is, that it may update itself remotely

Why ?

The incentive for a (second-stage) bootloader is the capability to update device software in the field. A bootloader update is only necessary for critical bugs. My company uses such bootloaders in about half a dozen different ECU devices in heavy machinery, and none of them is designed to update itself.

This "self-update" very much complicates the design. The bootloader, or crucial parts of it, must be relocated to RAM at runtime, since it cannot erase/program the section it runs from. Most MCUs cannot run any code from Flash while an erase program is ongoing (depending on bank design).
Rather do proper tests, considering all probable scenarios.

546 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @gato 

"

I'm wondering however, is there a way to erase Sector 0 from within the running software?

"

Sorry no, you can enter ISP mode or other program/debug tools to erase.

 

BR

Alice