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

Inconsistent PIO instruction docs in Pico C/C++ SDK PDF and RP2350 datasheet #416

Open
achan1989 opened this issue Sep 25, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation pdf pio A query about PIO.

Comments

@achan1989
Copy link

achan1989 commented Sep 25, 2024

The Pico C/C++ SDK PDF v3.0 is missing the assembler syntax for the wait <polarity> jmppin variant. Thankfully it's documented in the RP2350 datasheet, but the SDK doc should get it too.

The C/C++ SDK doc says the syntax for the wait <polarity> irq variant only permits (rel). The 2350 datasheet shows (rel, next, prev) at the top of section 11.4.3.3, but only (rel) immediately below that (which also re-explains the meaning of rel, which was done in the preceding section 11.4.3.2).

@achan1989 achan1989 changed the title Pico C/C++ SDK PDF: missing PIO wait jmppin Inconsistent PIO WAIT docs in Pico C/C++ SDK PDF and RP2350 datasheet Sep 25, 2024
@achan1989
Copy link
Author

And the RP2350 datasheet says wait <polarity> jmppin (+ <pin_offset>). Does it mean that providing an offset is optional, with a default of zero?

@achan1989
Copy link
Author

achan1989 commented Sep 25, 2024

Looking at the parser source, it looks like pioasm will accept wait <polarity> irq variants like

WAIT <pol> IRQ <num> REL
WAIT <pol> IRQ PREV <num>
WAIT <pol> IRQ NEXT <num>

The latter two conflict with the RP2350 datasheet, which says that PREV and NEXT must go after <num>, just like the REL variant.

@lurch lurch added documentation Improvements or additions to documentation pio A query about PIO. pdf labels Sep 25, 2024
@achan1989
Copy link
Author

That was all for the wait instruction. Similar issues with the irq instruction.

The C/C++ SDK doc says the syntax for the irq instruction only permits the (rel) option. The 2350 datasheet says it can be (prev, rel, next).

Pioasm will accept IRQ PREV <value> and IRQ NEXT <value>, but the RP2350 datasheet says PREV and NEXT must go after the <value>, like with REL.

@achan1989 achan1989 changed the title Inconsistent PIO WAIT docs in Pico C/C++ SDK PDF and RP2350 datasheet Inconsistent PIO instruction docs in Pico C/C++ SDK PDF and RP2350 datasheet Sep 25, 2024
@achan1989
Copy link
Author

Related: the C/C++ SDK docs for pioasm expressions (section 3.3.4) doesn't mention bitwise and/or/xor. But it looks like pioasm will accept them.

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