Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 18_PT1000 RDA5807M-FM-Radio flashaccess TF_conops_BAEFLAGIMAN ... more
You are viewing an older revision! See the latest version
Homepage
Currently only suitable for the KLXX devices! The name is more wishful thinking.
#include "mbed.h"
#include "FreescaleIAP.h"
#define address 0x10000
int main() {
int *data = (int*)address;
printf("Starting\r\n");
printf("Before erase = %d\r\n",*data);
erase_sector(address);
printf("After erase = %d\r\n",*data);
int number = 123456789;
program_word(address, (char*)&number);
printf("After programming = %d\r\n",*data);
while (true) {
}
}
This code is not finished. Even if it was finished IAP might do things you don't want it to do. Currently at least make sure you erase before programming