Is it feasible to use SD card to replace flash?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
lgyer
Posts: 29
Joined: Fri Feb 26, 2021 8:09 am

Is it feasible to use SD card to replace flash?

Post by lgyer » Wed May 12, 2021 9:36 am

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?

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

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

Post by karfas » Wed May 12, 2021 12:45 pm

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
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

Post Reply