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.
6 years, 4 months ago.
Flash IAP do not work
Which boards support Flash IAP ?
include the mbed library with this snippet
#include "mbed.h" DigitalOut myled(LED1); FlashIAP flash; int main() { flash.init(); RawSerial pc(PA_2,PA_3); pc.puts ("Hello world!"); while(1) { myled = !myled; pc.putc (flash.get_flash_size()); wait_ms(1000); } }
this example do not works with nucleo F411RE
1 Answer
6 years, 4 months ago.
Hello Nik,
- I'm not sure but think it supports all the mbed enabled boards.
- Since the
get_flash_size()
method returnsuint32_t
, try:
#include "mbed.h" FlashIAP flash; int main() { flash.init(); Serial pc(PA_2,PA_3); pc.printf("Hello world!\r\n"); pc.printf("flash_size = 0x%.8x\r\n", flash.get_flash_size()); flash.deinit(); }
For additional example have a look also at https://os.mbed.com/questions/82732/EEProm-Emulation-on-STM32L432KC .