Skip to content

zephyr: do dynamic bus allocation on CLUE boards #11603

Closed

Description

@dhalbert
No description provided.

Activity

  1. added this to the 11.0.0 milestone on Oct 14, 2026
  2. mikeysklar commented on Oct 28, 2026

    @mikeysklar
    Collaborator

    Tested on a CLUE with 11.0.0-alpha.2, which includes #11576. board.I2C() finds all five onboard sensors. I2C, SPI and UART on other pins can all be open at once alongside the display, and freed buses can be reused. Closing.

    Adafruit CircuitPython 11.0.0-alpha.2 on 2026-10-21; CLUE nRF52840 Express with nrf52840
    Board ID:adafruit_clue_nrf52840_zephyr
    UID:3909ACB25C7C1FC6
    
    Test code and output
    import board
    import busio
    
    i2c = board.I2C()
    while not i2c.try_lock():
        pass
    print("onboard I2C:", [hex(a) for a in i2c.scan()])
    i2c.unlock()
    print("display:", board.DISPLAY.width, "x", board.DISPLAY.height)
    
    i2c1 = busio.I2C(board.P8, board.P12)
    spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
    uart = busio.UART(board.TX, board.RX)
    print("I2C P8/P12, SPI, UART TX/RX open together: OK")
    
    try:
        busio.I2C(board.P5, board.P11)
    except ValueError as e:
        print("third I2C:", e)
    
    i2c1.deinit()
    i2c2 = busio.I2C(board.P5, board.P11)
    print("I2C P5/P11 after freeing P8/P12: OK")
    
    uart.deinit()
    board.UART().deinit()
    uart = busio.UART(board.TX, board.RX)
    print("busio.UART after board.UART().deinit(): OK")
    
    for bus in (i2c2, spi, uart):
        bus.deinit()
    onboard I2C: ['0x1c', '0x39', '0x44', '0x6a', '0x77']
    display: 240 x 240
    I2C P8/P12, SPI, UART TX/RX open together: OK
    third I2C: All I2C peripherals are in use
    I2C P5/P11 after freeing P8/P12: OK
    busio.UART after board.UART().deinit(): OK
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions