Skip to main content
cheney
Associate
March 9, 2021
Solved

When my code erased the configuration page, and the other pages is also erased

  • March 9, 2021
  • 1 reply
  • 639 views

I am using STM32F103C8T6.

This topic has been closed for replies.
Best answer by cheney

flashUnlock();

flashPageErase(0x0800FC00); // 0x0800FC00 is the last page of flash. After the erasing, page on 0x0800E800 is also erased

flashLock();

Futhermore, when I erase 0x8000DC00, 0x0800FC00 is also erased.

It seem's to be a malfunction of the chip.

After I run a CHIP ERASE using ST-LINK, then the problem disappear, the erasing runs normal.

1 reply

cheney
cheneyAuthorBest answer
Associate
March 9, 2021

flashUnlock();

flashPageErase(0x0800FC00); // 0x0800FC00 is the last page of flash. After the erasing, page on 0x0800E800 is also erased

flashLock();

Futhermore, when I erase 0x8000DC00, 0x0800FC00 is also erased.

It seem's to be a malfunction of the chip.

After I run a CHIP ERASE using ST-LINK, then the problem disappear, the erasing runs normal.