some enum pio_fifo_join elements misnamed #2261

Open
opened 2025-02-13 09:03:34 -06:00 by bytephunk · 1 comment
bytephunk commented 2025-02-13 09:03:34 -06:00 (Migrated from github.com)

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
};

github.com/raspberrypi/pico-sdk@95ea6acad1/src/rp2_common/hardware_pio/include/hardware/pio.h (L108)

enum pio_fifo_join elements PIO_FIFO_JOIN_**TX**GET 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 }; ``` https://github.com/raspberrypi/pico-sdk/blob/95ea6acad131124694cda1c162c52cd30e0aece0/src/rp2_common/hardware_pio/include/hardware/pio.h#L108
lurch commented 2025-02-13 09:35:34 -06:00 (Migrated from github.com)
Duplicate of https://github.com/raspberrypi/pico-feedback/issues/437 ?
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2261
No description provided.