Skip to main content
cheney
Associate
Mar 9, 2021 2:18 AM UTC
Solved

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

I am using STM32F103C8T6.

This topic has been closed for replies.
cheney
cheneyBest answer
Associate
Mar 9, 2021 2:51 AM UTC

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
Mar 9, 2021 2:51 AM UTC

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.