Question
STM32F3 Write in FLASH HAL_FLASH
Hi!
I'm trying to save values in the FLASH memory, but the values don't are saved. I've implemented erase command in order to preform flash_program command. I'm using a NUCLEO64 - STM32F303RE...
if(HAL_FLASH_Unlock() != HAL_OK)
{
debugPrintln(&huart2, "HAL UNLOCK ERROR");
}
FLASH_PageErase(0);
if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, (uint32_t) 0x08000000, (uint32_t) 0x01) != HAL_OK)
{
debugPrintln(&huart2, "HAL WRITE ERROR 1");
}
if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, 0x08000004, (uint32_t) 0x00000000) != HAL_OK)
{
debugPrintln(&huart2, "HAL WRITE ERROR 2");
}
if(HAL_FLASH_Lock() != HAL_OK)
{
debugPrintln(&huart2, "HAL lOCK ERROR");
}
After the execution, the maps is next:

