Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 8 months ago.
Flash memory sector gets cleared when uploading new executable
I'm working with the LPC1768 and I'm trying to save some text in its internal flash ROM and read that data back from another program using the IAP library. I can write the data to the flash and read the contents back in the same program where these instructions are being executed but when I check the contents of the same sector where I wrote it before on another program, it's all gone, I just see 0xFFFFFFF's everywhere. I followed exactly the IAP example code on https://mbed.org/users/okano/code/IAP_internal_flash_write/ and I've set the processor directives USER_FLASH_AREA_START and USER_FLASH_AREA_SIZE to protect the flash memory area from other usage during program execution. But it doesn't seem to change anything. What am I doing wrong?