2021-10-08 07:00 AM
i am using stm32f410RB Nucleo board i want to write and read some data in flash. In stm32f410RB 128 kbyte of flash and five sector, i want to write last sector this sector is 64k byte , but i want use only one page 2k byte, how can I erase one page, and write new data in that page? Is there any solution to erase one page of sector, without erasing other pages of same sector? or whole sector.
so please help me
give example code
khodifad lalit
2021-10-08 07:12 AM
You cannot erase only part of one sector. It's all or nothing.
2021-10-08 07:14 AM
You can't.
You can journal your writing across the entire space, and then erase and start-over less frequently.
You can carve out some of the smaller sectors at the front, but not the first, so the size is more compatible with the data you want to be writing/erasing.