In the last post I wrote that you could flash this Adafruit Feather with a version of MicroPython. Unfortunately it did not enable the use of the board’s SPIRAM. The specifications for this board declares that it has 4MiB of non-volatile (FLASH) and 2MiB of RAM (SPIRAM). When I went to check for the amount of free RAM it was far lower than I expected. That’s when I realized I’d use the wrong MicroPython image to flash the Feather. The correct link is: https://micropython.org/download/esp32spiram/ .
One way to test that you are seeing all the RAM is by adding two lines to the blink code, starting at line 13.
import espprint("Flash size {} in bytes".format(esp.flash_size()))import gcprint("Memory free {} in bytes.".format(gc.mem_free()))
When the code executes you’ll see the following (I’m working with Thonny, and this is in Thonny’s shell):
MPY: soft rebootesp32, esp32, 1.18.0, v1.18 on 2022-01-17, ESP32 module (spiram) with ESP32MicroPython-1.18.0-xtensa-IDFv4.2.2-with-newlib3.0.0Flash size 4194304 in bytesMemory free 2046144 in bytes.
Note the second line that contains “…ESP32 module (spiram)…”, and the last line that shows 2MiB of RAM memory.
You must be logged in to post a comment.