Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some enum pio_fifo_join elements misnamed #2261

Open
bytephunk opened this issue Feb 13, 2025 · 1 comment
Open

some enum pio_fifo_join elements misnamed #2261

bytephunk opened this issue Feb 13, 2025 · 1 comment
Assignees
Milestone

Comments

@bytephunk
Copy link

enum pio_fifo_join elements PIO_FIFO_JOIN_TXGET and PIO_FIFO_JOIN_TXPUT seem to refer to SHIFTCTRL_FJOIN_RX_GET SHIFTCTRL_FJOIN_RX_PUT in the rp2350 docs but 'RX' has been changed to 'TX' ? Likewise PIO_FIFO_JOIN_PUTGET should be perhaps named PIO_FIFO_JOIN_RXPUTGET since it also involves the pio RX register?

RP2350 Datasheet page 893:

When only SHIFTCTRL_FJOIN_RX_GET is set, the system can also write the RX FIFO registers with random access via
RXF0_PUTGET0 through RXF0_PUTGET3 (where RXFx indicates which state machine’s FIFO is being accessed). In this
state, the RX FIFO register storage is repurposed as additional configuration registers, which the system can update at
any time and the state machine can read at any time. For example, a UART TX program might use these registers to
configure the number of data bits, or the presence of an additional stop bit.
When both SHIFTCTRL_FJOIN_RX_PUT and SHIFTCTRL_FJOIN_RX_GET are set, the system can no longer access the RX FIFO
storage registers, but the state machine can now put/get the registers in arbitrary order, allowing them to be used as
additional scratch storage.

enum pio_fifo_join {
    PIO_FIFO_JOIN_NONE = 0,    ///< TX FIFO length=4 is used for transmit, RX FIFO length=4 is used for receive
    PIO_FIFO_JOIN_TX = 1,      ///< TX FIFO length=8 is used for transmit, RX FIFO is disabled
    PIO_FIFO_JOIN_RX = 2,      ///< RX FIFO length=8 is used for receive, TX FIFO is disabled
#if PICO_PIO_VERSION > 0
    PIO_FIFO_JOIN_TXGET = 4,   ///< TX FIFO length=4 is used for transmit, RX FIFO is disabled; space is used for "get" instructions or processor writes
    PIO_FIFO_JOIN_TXPUT = 8,   ///< TX FIFO length=4 is used for transmit, RX FIFO is disabled; space is used for "put" instructions or processor reads
    PIO_FIFO_JOIN_PUTGET = 12, ///< TX FIFO length=4 is used for transmit, RX FIFO is disabled; space is used for "put"/"get" instructions with no processor access
#endif
};

@lurch
Copy link
Contributor

lurch commented Feb 13, 2025

Duplicate of raspberrypi/pico-feedback#437 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants