Skip to content

Hard fault reading input from keyboard #10140

Open
@FoamyGuy

Description

@FoamyGuy

CircuitPython version and board name

Adafruit CircuitPython 9.2.4-274-g2af397ed1c on 2025-03-06; Adafruit Metro RP2350 with rp2350b
Board ID:adafruit_metro_rp2350

Code/REPL

import supervisor
import sys

while True:
    available = supervisor.runtime.serial_bytes_available
    if available:
        c = sys.stdin.read(available)
        print(c, end='')

Behavior

The code runs and waits until a key is pressed. Once a key is pressed the device reboots and there is this hardfault message in the serial console:

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.

Description

No response

Additional information

Using this keyboard: https://www.adafruit.com/product/857

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions