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 #2109

Open
wrtlprnft opened this issue Nov 27, 2024 · 0 comments
Open

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

wrtlprnft opened this issue Nov 27, 2024 · 0 comments

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant