forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as not planned
Description
CircuitPython version
Adafruit CircuitPython 8.2.7 on 2023-10-19; VCC-GND YD-ESP32-S3 (N16R8) with ESP32S3Code/REPL
from busio import I2C, UART
import board
i2c = I2C(board.GPIO41, board.GPIO42)
uart = UART(board.GPIO1, board.GPIO2, baudrate=9600)Behavior
Board disconnects from the computer, power cycles, then flashes triple yellow lights on loop.
On plugging it in and connecting via serial, this is the readout
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
Initially discovered that instantiating an I2C 1602 display and a UART audio card in the same imported file would cause a crash into safe mode.
Running the following by going into the REPL while it's in safe mode:
supervisor.runtime.safe_mode_reason
Returns SafeModeReason.Hard_Fault
Additional information
Workarounds found:
- Having no UART instantiation in the file no longer crashes on importing the file.
- Moving the UART instantiation to before the I2C instantiation also gives no crash
- Instatiating the I2C object at a lower speed such as
frequency=20000does not crash