Replies: 1 comment
-
Since the code runs from flash, erasing the chip would crash your program and (soft) brick the module. Probably not what you want. Typically ESP32 flash is broken up into partitions. You can erase/format a partition within your code. Main use for this is the filesystem (SPIFFS, etc). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to figure out how to use the generic SPI flash erase function housed here --> arduino-esp32/tools/sdk/esp32/include/spi_flash/include/spi_flash_chip_generic.h.
I am wanting to use...
esp_err_t spi_flash_chip_generic_erase_chip(esp_flash_t *chip);
...while running a program. I know there is the flash tool to erase a chip, but I have conditions that I want to call the erase chip function while the program is running. How is the *chip pointer handled exactly at the Arduino level to accomplish this? I can't find any SPI flash examples that utilize the direct read/writes for Arduino.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions