2021-06-01 10:12 AM
Hi ,
I am using the STM32L072Cz LoRa discovery Board and I am doing the flash erase by using the HAL function "HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError)"
I given the Start address 0x08000000 and No of pages to be erased to be 400 .
then only page one has got erased and other pages didn't erased !!!
for testing i have given random page address and No of pages to be 1,then this function has erased.
please suggest me here why this function is not able to erase the more pages ???
Solved! Go to Solution.
2021-06-01 12:34 PM
Typically your code is at 0x08000000. Erasing FLASH currently in use by your code will lead to undefined or at least unsupported behavior.
2021-06-01 10:32 AM
All the source is provided, you could inspect / analyze
If passing a local variable/array ensure it is fully initialized.
Check for error/status returned.
Are you erasing code that's executing, or contains the active vector table?
2021-06-01 12:34 PM
Typically your code is at 0x08000000. Erasing FLASH currently in use by your code will lead to undefined or at least unsupported behavior.