Writing to a flash partition without erasing first
Posted: Sun Jun 21, 2020 4:30 pm
Hi,
My goal is to use a dedicated flash partition to store data persistently.
According to the documentation, a esp_partition_write() call must be after we first esp_partition_erase_range() the relevant sections in the partition. So if it is the "first run" erasing the entire partition is easy.
On consecutive runs I need to way to update the data in the partition, but writing must be done after erasing. And indeed trying to write without erase does nothing (although esp_partition_write() report ESP_OK).
How should I overcome this?
Thanks
My goal is to use a dedicated flash partition to store data persistently.
According to the documentation, a esp_partition_write() call must be after we first esp_partition_erase_range() the relevant sections in the partition. So if it is the "first run" erasing the entire partition is easy.
On consecutive runs I need to way to update the data in the partition, but writing must be done after erasing. And indeed trying to write without erase does nothing (although esp_partition_write() report ESP_OK).
How should I overcome this?
Thanks