Page 1 of 1

Is it feasible to use SD card to replace flash?

Posted: Wed May 12, 2021 9:36 am
by lgyer
Hi guys

I am a novice. Because the maximum size of flash is 16MB in ESP32. I want to ask that, is it feasible to use SD card to replace flash to boot the esp32 and run?
Does the micropython to support this mode?

Re: Is it feasible to use SD card to replace flash?

Posted: Wed May 12, 2021 12:45 pm
by karfas
I'm pretty sure it is possible to mount the SD card and run your .py or .pyc files from there.

However, I don't see any advantage doing so.
The limiting factor for micropython scripts on the ESP32 is not the flash size, it's the ~100kB free heap memory.
I assume that a few hundred kB of python scripts (even when precompiled+frozen to flash) will most likely use way more RAM than available.

You can use your SD card to write data to it instead of writing to flash.
I would prefer this use, because flash (at least the internal) is rated with max. 100k writes per memory block.

Regards,

Thomas