'Flash Erase Issue After the Reset

I've flash erase problem after reset.

My source code routine like this:

  1. Boot code start at address 0x08000000

  2. Than read eeprom value if eeprom value is User value

  3. And jump user application. ( To 0x080A0000)

  4. After the successfuly jumping, I get new firmware updte request and write to eeprom value to BOOT and reset the device

  5. Than Boot Code start again at 0x08000000 address and if eeprom value BOOT than erase the User App Area address( 0x080A0000).

But in the 5th step, 0x080A0000 address couldnt erase although any erase fault flag return.

I tried without jump the User code, I try to erase 0x080A0000 area in 1st step I could erase successfuly. But If I jump User App and reset the device I coudnt erase 0x080A0000 address. What is the reason for this problem and how can I solve this ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source