IAP Reprogram Sector 0 on LPC15xx

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

IAP Reprogram Sector 0 on LPC15xx

跳至解决方案
604 次查看
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

标签 (1)
0 项奖励
1 解答
590 次查看
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

在原帖中查看解决方案

2 回复数
583 次查看
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.

591 次查看
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