I'm using an ESP32 connected to an external memory flash where I mounted a FATFS partition.
I don't understand what could happen if I turn off the ESP32 (and the flash) after a fopen()
instruction. The main purpose is to avoid any corruption of the file being read or written.
In particular I use a rb+
argument for the fopen()
when I read the file, and a wb
when I write on it.
In which case I can obtain errors on the opened file, if something such as an unwanted switch off of the system happens?