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.
10 years, 8 months ago.
Nucleo L152RE EEPROM issue
I'm trying to write double word in EEPROM through following code:
include the mbed library with this snippet
#include "mbed.h"
Serial pc(USBTX, USBRX);
int main()
{
uint64_t a=1;
HAL_FLASHEx_DATAEEPROM_Unlock();
HAL_FLASHEx_DATAEEPROM_ProgramDoubleWord(0x08080008, a);
HAL_FLASHEx_DATAEEPROM_Lock();
uint32_t address=0x08080008;;
uint64_t tmp = *(__IO uint64_t*)address;
pc.printf("value=%d\n\r",tmp);
}
But it get stuck at "HAL_FLASHEx_DATAEEPROM_ProgramDoubleWord(0x08080008, a);".
Kindly can somebody tell me the error?
Thankyou.