MicroPython on ESP32 with SPIRAM support

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
aihrig
Posts: 6
Joined: Mon Aug 17, 2020 10:25 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by aihrig » Wed Aug 26, 2020 11:23 pm

rcolistete wrote:
Wed Aug 26, 2020 10:43 pm
ESP32 w/4mb, and a SparkFun ESP32 with 16mb
of RAM or flash ?
https://www.sparkfun.com/products/15663
The sparkFun says 16MB Flash and 520k internal SRAM.

And the other one shows 4MB (I'm assuming flash, but it's cheap generic one, so not completely sure)

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: MicroPython on ESP32 with SPIRAM support

Post by rcolistete » Thu Aug 27, 2020 6:46 am

aihrig wrote:
Wed Aug 26, 2020 11:23 pm
rcolistete wrote:
Wed Aug 26, 2020 10:43 pm
ESP32 w/4mb, and a SparkFun ESP32 with 16mb
of RAM or flash ?
https://www.sparkfun.com/products/15663
The sparkFun says 16MB Flash and 520k internal SRAM.

And the other one shows 4MB (I'm assuming flash, but it's cheap generic one, so not completely sure)
So there is no SPIRAM/PSRAM -> MicroPython shows 70-100 kB of free SRAM.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

aihrig
Posts: 6
Joined: Mon Aug 17, 2020 10:25 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by aihrig » Sat Aug 29, 2020 1:36 am

rcolistete wrote:
Thu Aug 27, 2020 6:46 am

So there is no SPIRAM/PSRAM -> MicroPython shows 70-100 kB of free SRAM.
Ah, ok. Thanks - that makes sense now.

modulusmath
Posts: 30
Joined: Thu Jun 30, 2022 3:21 am

Re: MicroPython on ESP32 with SPIRAM support

Post by modulusmath » Fri Jul 08, 2022 3:22 am

Thanks to all for the information.

Sharing some details to be searchable later and perhaps help someone:

"ESP32-CAM-MB Aideepen with OV2640 2MP Camera" is able to work with esp32spiram-20220618-v1.19.1.bin and show spiram:

>>> import micropython

micropython.mem_info()
stack: 736 out of 15360
GC: total: 4098240, used: 12832, free: 4085408
No. of 1-blocks: 298, 2-blocks: 37, max blk sz: 24, max free sz: 255327

>>> print(f"{gc.mem_free()/1024} k")
3987.969 k

>>> gc.mem_alloc() + gc.mem_free()
4098240
I am not successful using the actual camera yet, but for the price, it's still quite nice.

Post Reply