a correction to: adafruit esp32 feather v2

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 esp
print("Flash size {} in bytes".format(esp.flash_size()))
import gc
print("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 reboot
esp32, esp32, 1.18.0, v1.18 on 2022-01-17, ESP32 module (spiram) with ESP32
Flash size 4194304 in bytes
Memory free 2046144 in bytes.

Note the second line that contains “…ESP32 module (spiram)…”, and the last line that shows 2MiB of RAM memory.