LPC845 IAP, page erase

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

LPC845 IAP, page erase

1,160 Views
rianzu
Contributor II

We develop a OTA upgrade feature for a LPC845 based project.

We noticed that IAP - ERASE PAGE command (59 dec) is able to erase a single 64 byte page which is extraordinarily.

Two questions arrives:

1) Is this reliable? I mean what's behind IAP in case of loss of power during write page ?

The concern is that entire sector (where the page is) can be corrupted?

Or just page in discussion.

2) There is a restriction to not access FLASH while this IAP is in progress.

So the best approach (reliable) is to wait for IAP complete.

How can we calculate worst case wait over temp range and Vdd?

Thanks for clarifications.

Labels (1)
0 Kudos
3 Replies

916 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Rian Malcovich ,

1) " entire sector (where the page is) can be corrupted?"

-> No, only erase the page. There is  "Flash_IAP" demo under LPC845 Code Bundule :

LPC84x 30MHz|Arm® Cortex®-M0+|32-bit Microcontrollers (MCUs) | NXP 

I did some change to test based on this demo, confirmed  page erase function:

After erase page:

pastedImage_3.png

then writhe this page:

pastedImage_4.png

2) Before access FLASH , please disable all interrupts.

About "How can we calculate worst case wait over temp range and Vdd?", sorry I'm not very clear your meaning,

could you please description it in detail.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

916 Views
rianzu
Contributor II

Understood for 1) and thank you.

For 2) the flash must NOT be accessed until IAP execution finished.

So we must have a blocking loop to allow time to elapse.

The question is how long to wait, how to calculate to have a safety margin under worst case conditions.

0 Kudos

916 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Rian,

The IAP commands all have return Status,

we can  check the Statue code to confirm whether  finished:

pastedImage_3.png

pastedImage_2.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos