Can't erase sector after burn serial number

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

Can't erase sector after burn serial number

3,609 Views
Guy_mego
Contributor II

Hey All,

I'm using LPC11u67 nxp MCU, I wrote a secondary bootloader that will upgrade the FW via BLE communication. In addition I burn the serial number in the last sector of the flash which locate in address 0x18000. 
The issue after I burn the serial once or the new FW, I can't erase again the flash using the same function I used at the first time. I thought that might be a problem with the board but when I'm trying to erase the sector using J-Flash I succeeded.
Attached the two function once that erase the sector from 6 to 23 and function that erase the the last sector. In both cases the functions return true (success), but when I explore the memory there is no change. 

Please any one can help me understand why I can't delete the sectors after I write them once, and the solve this issue. 

Thanks in advance.

Labels (1)
0 Kudos
Reply
3 Replies

3,513 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Guy_mego 

How about test it in flashiap demo?  Add the erase last sector code into it.

Take a screenshot about the data before erase and after. BTW. If have the same issue, send your project and results to me. BTW, how do you read flash memory?

 

BR

Alice

0 Kudos
Reply

3,498 Views
Guy_mego
Contributor II

Hi Alice, 

Thanks for your respond.
I'm not familiar with flashiap demo, is it a feature on MCUXpresso IDE?
In order to read the flash memory is a assign a pointer with the specific address of the flash I want read.

In order to view the memory before and after erase I use the MCUXpresso tool during debug that can show the memory per a given address. 

Thanks.

0 Kudos
Reply

3,489 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Guy_mego 

" flashiap" is an example under LPCopen, which supports MCUXpresso IDE.

Download from https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools... 

 

BR

Alice

0 Kudos
Reply