forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
CircuitPython version
Version 8.0.0 on PCA10100
Code/REPL
import busio, board, digitalio, time
from adafruit_bus_device.spi_device import SPIDevice
buf = bytes([0x90,0x00,0x00,0x00])
cs = digitalio.DigitalInOut(board.P0_17)
comm_port = busio.SPI(board.P0_14, MOSI=board.P0_20, MISO=board.P0_21)
device = SPIDevice(comm_port, cs)
with device as bus_device:
bus_device.write(buf)
result = bytearray(2)
bus_device.readinto(result)
print("".join("{:02x}".format(x) for x in result))
Behavior
Device becomes undetectable. CircuitPython Drive disappears from file explorer.
Description
Also tried using general busio.write() and not SPIDevice. Same error. I have to reflash the board each time.
Additional information
No response