microReticulumTbeam/exercises/16_PSRAM/README.md

32 lines
1.4 KiB
Markdown

# Exercise 16: PSRAM
This exercise demonstrates usage of PSRAM (Pseudo SRAM) on an ESP32-S3 board, alongside regular RAM metrics.
Behavior:
- Reports heap and PSRAM statistics every second over serial.
- Shows live heap and PSRAM status on the OLED display (both on same line).
- Allows you to write/append/read/clear data in a PSRAM-backed buffer (up to ~2MB).
- Designed as an extension of Exercise 15_RAM to explore larger volatile storage.
Note: the exercise now targets a PSRAM-enabled ESP32-S3 board definition (`freenove_esp32_s3_wroom`). This board profile has 8MB flash + 8MB PSRAM, matching the T-Beam Supreme specifications. If your hardware differs, adjust accordingly.
Sources:
- LilyGo T-Beam SUPREME datasheet/wiki: https://wiki.lilygo.cc/get_started/en/LoRa_GPS/T-Beam-SUPREME/T-Beam-SUPREME.html
- PlatformIO board definition: https://docs.platformio.org/page/boards/espressif32/freenove_esp32_s3_wroom.html
- Local PlatformIO board metadata: ~/.platformio/platforms/espressif32/boards/freenove_esp32_s3_wroom.json
Build and upload:
```bash
cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/16_PSRAM
pio run -e amy -t upload
pio device monitor -b 115200
```
Commands:
- `help` - show command menu
- `stat` - show PSRAM buffer state
- `read` - read PSRAM buffer contents
- `clear` - clear PSRAM buffer
- `write <text>` - write text to PSRAM buffer
- `append <text>` - append text to PSRAM buffer