Erase Flash sector 0 - LPC1788

2 replies [Last post]
Arkadyosh
Offline
Joined: 2012-04-24

Hello,

I have question about erasing Flash sector 0. In my application I want erase sector 0 to invalid checksum(at the reset uC go into bootloader), and next reset uC by NVIC_SystemReset() function. Can I use this procedure without any consequences? Is there any contraindication to erase sector 0? Can this crash or lock uC? Maybe before erase sector 0 I must execute some special procedure, like a remap vector table or something else?

Regards,
Arkadyosh

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
stevech
Offline
Joined: 2012-04-26

In the older LPC21xx, the in ROM primary bootloader ran at power-up/reset and it checked that sector 0 checksum in the vector table. If the checksum was invalid, the bootloader would not exit... assuming you have no code to run until something is either sent into the primary bootloader or you JTAG'd some code including sector 0. The same logic may still be in use in the newer chips.

Arkadyosh
Offline
Joined: 2012-04-24

This is the point, I want erase checksum that uC go into bootloader at next time when it power-up/reset. But Im not sure that this method is good and safe for uC?

feedback