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

pio wait irq next/prev: Documentation and pioasm disagree #440

Open
wrtlprnft opened this issue Nov 27, 2024 · 1 comment
Open

pio wait irq next/prev: Documentation and pioasm disagree #440

wrtlprnft opened this issue Nov 27, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation pdf pio A query about PIO. rp2350 Concerning the RP2350 chip

Comments

@wrtlprnft
Copy link

In what I think is the latest version of the rp2350 datasheet (build-date: 2024-10-16, build-version: 5e790a3-clean), “11.4.3.3. Assembler Syntax” describes the following:

wait <polarity> irq <irq_num> (rel, next, prev)

However, pioasm's parser.yy defines the following syntax (abridgred except):

wait_source:
    IRQ comma value REL
  | IRQ PREV comma value
  | IRQ NEXT comma value
  | IRQ PREV comma value REL /* only for error message */
  | IRQ NEXT comma value REL /* only for error message */
  | IRQ comma value
  | […]

Experimentation confirms this:

wait irq 0 next ; does not compile
wait irq next 0 ; works

My best guess is that the documentation is incorrect. For the .mov_status irq <(next|prev)> set <n> directive, both agree that the next|prev keyword should go after the irq keyword, and the way the parser specifies the syntax seems to be clearly intentional.

So I guess the documentation should explicitly mention two alternatives as rel must be at the end:

wait <polarity> irq <irq_num> rel
wait <polarity> irq (next, prev) <irq_num>
@kilograham kilograham transferred this issue from raspberrypi/pico-sdk Jan 6, 2025
@kilograham
Copy link

moved to pico-feedback as it is the documentation that is wrong

@lurch lurch added documentation Improvements or additions to documentation pio A query about PIO. pdf rp2350 Concerning the RP2350 chip labels Jan 6, 2025
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. rp2350 Concerning the RP2350 chip
Projects
None yet
Development

No branches or pull requests

3 participants