This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FLASH write problem - using the same memory bank for bootloader and application

I'm having a problem trying to implement a bootloader and application code in the same bank.

The scenario is that follows:
A LPC1837 (micro controller from NXP) with a bootloader that occupies the first 64 kB of the FLASH A BANK (sectors 0 to 7). I want to write application image on the following sectors of the on-chip flash (sectors 8 to 14) at the same bank.

The problem is when I try to write the flash using the IAP calls (prepare, erase, prepare, write) the core raises a hardfault. but same code is working when i changing the "destination" to the on-chip flash BANK B, the whole procedure works fine. I've already checked the content of the FLASH B after running the application image, and it's fine.

I want to know the reasons for this problem.

ans also Is there any ways to write a image in the same bank ?