Question 1:
While using the Flash functions in flash_ops.c. It seems that the flash erase function
esp_err_t IRAM_ATTR spi_flash_erase_range(uint32_t start_addr, uint32_t size)
is limited to erasing 32768 bytes at a time – is this True?
The erase function does not return any error – however I have a function that I am using to test the SPI flash by writing and reading back data. It only works if I erase smaller chunks at a time.
Question 2:
Do these functions support unaligned access yet?
The spi_flash_erase_range() function should erase any size, as long as it's offset/size are a multiple of 4096 bytes and the region doesn't overflow the configured flash size. If the erase covers any 32KB aligned blocks, these are erased using the "block erase" function as this is faster than erasinRead more
The spi_flash_erase_range() function should erase any size, as long as it’s offset/size are a multiple of 4096 bytes and the region doesn’t overflow the configured flash size.
If the erase covers any 32KB aligned blocks, these are erased using the “block erase” function as this is faster than erasing 8x 4KB sectors individually.
See less