2020-01-30 01:49 AM
Hello,
I am working with STM32F4 discovery.
I want to use EEPROM to write and read data. I have taken example code from https://github.com/PaxInstruments/STM32CubeF4/tree/master/Projects/STM32F4-Discovery/Applications/EEPROM/EEPROM_Emulation and it works fine.
Then i tried to use it in my program. But i am getting HAL_ERROR.
I used the EE_WriteVariable and EE_ReadVariable functions to perform write and read.
But EE_WriteVariable always return HAL_ERROR.
I tried to debug and came to know that in function
FLASH_WaitForLastOperation() following code
if (__HAL_FLASH_GET_FLAG((FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | \ FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR | FLASH_FLAG_RDERR)))
{
/*Save the error code*/
FLASH_SetErrorCode();
return HAL_ERROR;
}
return 0x0c.
I have checked the value of FLASH->SR it is 0x0c.
Can you please help me what is meaning of the 0x0c?
why it is not performing write operation?
Waiting for your kind reply.
2020-02-03 02:16 AM
Any help regarding the issue?