Open
Description
CircuitPython version and board name
Adafruit CircuitPython 9.2.4 on 2025-01-28; Adafruit Feather RP2350 with rp2350a
Code/REPL
from board import SPI, D5, D6
import displayio
from fourwire import FourWire
import supervisor
from adafruit_st7789 import ST7789
# Initialize 320x240 ST7789 IPS display with terminal at 2x scale.
# The 2x zoom makes it easier to read the display.
displayio.release_displays()
bus = FourWire(SPI(), chip_select=D5, command=D6)
display = ST7789(bus, width=320, height=240, rotation=270)
supervisor.reset_terminal(160, 120)
zoom_2x = displayio.Group(scale=2)
display.root_group = None
zoom_2x.append(displayio.CIRCUITPYTHON_TERMINAL)
display.root_group = zoom_2x
# To trigger the hard fault, connect to serial REPL and run a command like `1+1` or `print()`
Behavior
- When the board boots from a hard reset, the boot messages look normal, and I can open the REPL and get a prompt
- Editing a line of text at the REPL prompt works fine. But, as soon as I press Enter to run a command like
1+1
,print("hello world")
, orimport board
, the board resets. The only exception I found is if I press Enter on a blank line. In that case, I get another>>>
prompt. A single space, a#
, or anything else I tried would trigger a reset. - Upon reconnecting to the serial terminal, it shows a hard fault message:
Auto-reload is off.
Running in safe mode! Not running saved code.
You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.
Press any key to enter the REPL. Use CTRL-D to reload.
Description
Hardware setup:
- Feather RP2350 on a breadboard with an EYESPI breakout board
- Wiring: Feather 3.3V to EYESPI Vin, GND to GND, SCK to SCK, MOSI to MOSI, D5 to TCS, D6 to DC (reset not connected)
- Display: 2.0" 320x240 Color IPS TFT Display with microSD Card Breakout - ST7789 EYESPI
Libraries:
- adafruit_st7789 from https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20250220/adafruit-circuitpython-bundle-9.x-mpy-20250220.zip
Notes on Reproducer Code:
- I tried reducing the reproducer to something smaller, but all of the included lines appear to be necessary to trigger the bug.
- If I just do a
supervisor.reset_terminal(160, 120)
without changing anything about the root group, the display shows 4 tiled copies of the 160, 120 terminal. But, the characters look kinda glitched. It seems possible there might be some kind of buffer overflow thing going on.
Additional information
No response