Skip to content

r2pio.StateMachine non-polling read #7452

Closed
@dmopalmer

Description

@dmopalmer

An rp2pio.StateMachine has .background_write() which lets the user queue up large quantities of data to be sent to the Statemachine automatically, refilling in the small FIFO buffer as the data is consumed.

However, there is no equivalent capability to read the FIFO in the background, so after the StateMachine generates 4 (or 8) data values, it is blocked or loses data. Therefore, the user program must constantly poll the input to see if there is anything available to read.

It would be nice to be able to set up an input buffer that is fed by the FIFO, either on interrupt or via a DMA channel. That way, when the PIO generates large amounts of data, it is not lost. (Similar to how Serial ports read into a buffer until the CircuitPython program is ready to read input.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions