Skip to content

AVR USART and SPI0_CTRLA release() can deselect before the last byte finishes #5133

Closed

Description

@zackees

Unlike the classic AVR class, whose release() calls waitFully() first, the USART and modern SPI0_CTRLA classes in src/platforms/avr/fastspi_avr.h call mPSelect->release() with a byte possibly still shifting. writePixelsToSPI calls release() straight after its last writeByte, so a device with a Selectable could lose its final byte. Also, select() may reprogram the rate while that byte shifts. Found by code review during #5055; not reproduced, and no in-tree chipset was confirmed to set a Selectable on these classes.

Activity

  1. added
    sanitized
    on Nov 7, 2026
  2. moved this from Triage to Done in FastLED Trackeron Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions