LPC1788 IAP programming

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

LPC1788 IAP programming

597 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by FrankAndersen on Mon Feb 15 07:42:07 MST 2016
Hi,

I have a program, that uses IAP for updating itself, I know it is with the risk of making it to a brick.

But untill now it has been working fine, but I now need to run the core at 96 MHz instead of 48 MHz.

I did change Param2 to 96000.

Sometimes it does not erase other times it does erase but does not write everything to the internal flash.

It looks like it makes a reset, in the middle of it all.

Any suggestions?

Best regards,

Labels (1)
0 Kudos
1 Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Fri Mar 04 02:55:03 MST 2016
Hi Frank,

We use IAP for similar purpose on LPC1769. Two pitfalls I encountered:
1. Make sure you disable interrupts before calling IAP functions. You don't want interrupts while IAP ROM code is active!
2. Make sure the  CPU clock frequency parameter for the IAP erase function has correct value (system core clock) - We had the issue where it was based on global variable LPCOpen variable SystemCoreClock and this variable somehow ended up with value 0. In this situation the IAP says all went well and erasing was OK. But in fact nothing happened - nothing was erased. (bug in IAP ?)  To avoid this problem we use a constant for clock parameter now. Same goes for write function.

Hope this helps.
0 Kudos