2021-10-24 10:16 PM
I am Using STM32l562E-DK, I am using SBSFU (ported from NUCLEO-L552ZE-Q).
I want to store 16-byte data at 0x61000 location in external Flash.
If I perform the following steps, My data is modified as expected.
1) Read 4 KB sector data
2) Modify required parameter
3) Erase 4KB sector
4) Write modified 4KB data
But If I don't perform 3rd step, my modified data is not related. What is a possible reason for it?
I am using low_level_ospi_flash.c to perform read, erase, and write data. I have set the correct range in write and erase in low_level_ospi_device.c file
Is it possible to exclude 3rd step ? What is a method to writing data without erasing the whole sector?
2021-10-24 10:17 PM
@Frantz LEFRERE , Can you please help me regarding this?
2021-10-25 02:35 AM
It is in the nature of flash memory that write operations only allow transition of a bit from 1 to 0. To set a bit from 0 to 1 requires an erase operation and an erase operations applies to an entire erase block. The size of an erase block varies between devices.