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

RP2350 pioasm .fifo putget configuration description #437

Open
magy00 opened this issue Jan 2, 2025 · 4 comments
Open

RP2350 pioasm .fifo putget configuration description #437

magy00 opened this issue Jan 2, 2025 · 4 comments
Labels
documentation Improvements or additions to documentation pdf pio A query about PIO.

Comments

@magy00
Copy link

magy00 commented Jan 2, 2025

In the pioasm documentation of the pico-series C/C++ SDK, and of the RP2350 datasheet as well, it looks like the entry putget for directive .fifo <fifo_config> should be something like

putget: 4 FIFO entries for TX, and 4 FIFO entries in common for mov rxfifo[index], isr aka put and mov osr, rxfifo[index] aka get.

instead of

putget: 4 FIFO entries for mov rxfifo[index], isr aka put, and 4 FIFO entries for mov osr, rxfifo[index] aka get.

It would probably also be helpful if the association between the constants used for pioasm, SDK defines, and hardware register defines, could be clarified somewhere, since the three different sections don't include all the same details (note, for example, that TXGET [presumably from TX-FIFO+RX-GET] corresponds to RX_GET [presumably from RX-FIFO-used-for-GET]):

pioasm           SDK API                 hw register
txrx   <=>  0 == PIO_FIFO_JOIN_NONE  <=> -
tx     <=>  1 == PIO_FIFO_JOIN_TX    <=> FJOIN_TX
rx     <=>  2 == PIO_FIFO_JOIN_RX    <=> FJOIN_RX
txget  <=>  4 == PIO_FIFO_JOIN_TXGET <=> FJOIN_RX_GET
txput  <=>  8 == PIO_FIFO_JOIN_TXPUT <=> FJOIN_RX_PUT
putget <=> 12 == PIO_FIFO_JOIN_PUTGET == PIO_FIFO_JOIN_TXPUT|PIO_FIFO_JOIN_TXGET <=> FJOIN_RX_PUT|FJOIN_RX_GET

It would also be nice to have the pioasm directives section of the RP2040 datasheet updated to SDK 2.1.

@lurch
Copy link
Contributor

lurch commented Jan 2, 2025

Perhaps the apparent inconsistency between TXGET (in the SDK) and RX_GET (in the PIO hardware registers) is because the SDK is looking at things from the system-side, where it transmits data to the FIFO; whereas the PIO hardware registers are looking at things from the PIO-side, where it receives data from the FIFO?

@lurch lurch added documentation Improvements or additions to documentation pio A query about PIO. pdf labels Jan 2, 2025
@magy00
Copy link
Author

magy00 commented Jan 3, 2025

Possibly (but then maybe put and get need also to be exchanged?).

In the RP2350 datasheet, there is PINCTRL_JMP_PIN mentioned twice. This should probably be one of the other used EXECCTRL_JMP_PIN, JMP_PIN, JMPPIN or jmppin identifiers (like with the different but similar names above, a simple keyword search in the PDF datasheet cannot find all the relevant information, and they are not linked to each other [as in hypertext or in a glossary or so]). Also mentioned in #430.

@lurch
Copy link
Contributor

lurch commented Jan 3, 2025

In the RP2350 datasheet, there is PINCTRL_JMP_PIN mentioned twice.

Yeah, looks like there might have been a bit of a mix-up and this should probably have been EXECCTRL_JMP_PIN i.e. referring to the JMP_PIN field in the SM0_EXECCTRL, SM1_EXECCTRL, SM2_EXECCTRL & SM3_EXECCTRL registers.

@magy00
Copy link
Author

magy00 commented Jan 4, 2025

Maybe the frequency of all-caps words in the docs could help to detect such instances (but of course nowadays AI could probably be directed to do such).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation pdf pio A query about PIO.
Projects
None yet
Development

No branches or pull requests

2 participants