1 week ago.
EEProm Emulation on STM32L432KC
Hello, my question is a bit stupid, but i have spent one week to check the forum and trying different methods how to solve it and without sucess :( I am using the Nucleo STM32L432KC and I need to save only 5 bytes into the EEPROM as a configuration data. Because this MCU don't have EEPROM it is necessary to save it into Flash. I have found few examples and I have tested it - but without success.
One, which is here in forum was to use the back-up registers from RTC, but there is necessary to have backup battery - i dont have it in my application :(
Second was to use Flash HAL API. I did a short test below, but EEdata_read on the end are 0, not 55.
uint32_t EEaddress = 0x8020000; start on 128kB
uint8_t EEdata_write = 55;
uint32_t EEsize = 1;
int32_t flash_init (flash_t *obj);
int32_t flash_program_page(flash_t *obj, uint32_t EEaddress, const uint8_t *EEdata_write, uint32_t EEsize);
int32_t flash_read(flash_t *obj, uint32_t EEadress, uint8_t *EEdata_read, uint32_t EEsize);
The third what I tested was recommendation from this page http://micromouseusa.com/?p=606 but also without success :(
And I can continue - I really tested lot of different examples during this week, but with the same result - it is not working :(
Is here somebody who can recommend me simple and working solution how to save 5 bytes? I am realy desperate, because I am bit new in programing of ARM and I am not able to make some working solution myself :(
Thank you very much, I will be very grateful for your help.
1 week ago.
That must be very frustrating :( I haven't tried it yet but the Flash IAP might help solve the issue.
Have a look also at https://os.mbed.com/questions/82407/How-do-I-use-a-txt-file-in-an-embedded-d.
To post an answer, please log in.