Skip to content

Macropad RP2040 locks up using board.SPI() #4965

@dgriswo

Description

@dgriswo

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.3-471-g7f39779f4 on 2021-07-01; Adafruit Macropad RP2040 with rp2040

Code/REPL

import board
import displayio

from adafruit_displayio_sh1106 import SH1106

OLED_WIDTH = 128
OLED_HEIGHT = 64

displayio.release_displays()

display_bus = displayio.FourWire(
    board.SPI(),
    command=board.OLED_DC,
    chip_select=board.OLED_CS,
    reset=board.OLED_RESET,
    baudrate=1000000,
)

display = SH1106(display_bus, width=OLED_WIDTH, height=OLED_HEIGHT)

Behavior

When creating display_bus, the board locks. Serial stops responding and the CIRCUITPY drive becomes unavailable.

Description

No response

Additional information

Using busio, the display initializes as expected.

import board
import displayio
import busio

from adafruit_displayio_sh1106 import SH1106

OLED_WIDTH = 128
OLED_HEIGHT = 64

displayio.release_displays()
spi = busio.SPI(board.SCK, board.MOSI)
display_bus = displayio.FourWire(
    spi,
    command=board.OLED_DC,
    chip_select=board.OLED_CS,
    reset=board.OLED_RESET,
    baudrate=1000000,
)
display = SH1106(display_bus, width=OLED_WIDTH, height=OLED_HEIGHT)

Metadata

Metadata

Assignees

No one assigned

    Labels

    boardNew board or update to a single boardbugrp2040Raspberry Pi RP2040

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions