IAP code for Freescale platforms
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