forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
CircuitPython version
Adafruit CircuitPython 8.2.6 on 2023-09-12; TinyS3 with ESP32S3Code/REPL
import digitalio
import time
import board
time.sleep(5) # give us some time to update code via USB when we are stuck in a crash loop.
tmp = digitalio.DigitalInOut(board.D34)
tmp.direction = digitalio.Direction.OUTPUT # crashes the boardBehavior
Board crashes and hard resets
Description
When I try to set D34 pin as output using the digitalio module the board hard resets.
This always happens. The board doesn't give any error message so finding the root cause was really hard.
Additional information
One workaround I've found is:
import digitalio
import time
import board
time.sleep(5) # give us some time to update code via USB when we are stuck in a crash loop.
tmp = digitalio.DigitalInOut(board.D34)
tmp.switch_to_output(True)Then the board does not crash during setup. But when I try to set the value it will still crash so the workaround doesn't really help me for long:
tmp.value = False # crashes the board
tmp.switch_to_output(False) # this crashes the board as well, workaround doesn't work anymore