Difference of writing 0xFFFFFFFFFFFFFFFF to page erase in flash?
Hi,
After a flash page erase I can write 0xFFFFFFFFFFFFFFFF to a certain position in my desired page (see code snippet). This for sure doesn't change the content of my Flash. However if I want to write again on that very same position, a PROGERR comes up. So there must be a bit or so that describes if a position in the flash page has already been written or not (even if it is a 0xFFFFFFFFFFFFFFFF value). Where can I find that bit?
HAL_FLASH_Unlock();
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x0801F000, 0xFFFFFFFFFFFFFFFF) != HAL_OK)
{
Error_Handler();
}
HAL_FLASH_Lock();
HAL_FLASH_Unlock();
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x0801F000, 0x1111111111111111) != HAL_OK)
{
Error_Handler(); // This Error_Handler() gets called, due to PROGERR
}
HAL_FLASH_Lock();Kind regards
Simon