Fix WAIT GPIO n for n > 32 and when using gpio_base = 16 #2265

Merged
kilograham merged 1 commit from pio_wait_jmp_hi_pins into develop 2025-02-14 09:26:23 -06:00
kilograham commented 2025-02-13 19:09:01 -06:00 (Migrated from github.com)
  • fix bug: pioasm was spilling bit 5 of arg2 into arg1
  • make pio_add_program flip bit 5 of a WAIT GPIO instruction if gpio_base is 16

Note: pioasm will encode only the bits 4-0 of arg2 (the GPIO number), however it does indicate whether 0-15 means 0-15 or 32-47. This can only be fixed up when loading the program, and indeed once the GPIO base is known. pio_can_add_program and friends already detected the cases where this was impossible

- fix bug: pioasm was spilling bit 5 of arg2 into arg1 - make pio_add_program flip bit 5 of a WAIT GPIO instruction if gpio_base is 16 Note: pioasm will encode only the bits 4-0 of arg2 (the GPIO number), however it does indicate whether 0-15 means 0-15 or 32-47. This can only be fixed up when loading the program, and indeed once the GPIO base is known. pio_can_add_program and friends already detected the cases where this was impossible
kilograham commented 2025-02-13 19:09:11 -06:00 (Migrated from github.com)

fixes #2141

fixes #2141
peterharperuk (Migrated from github.com) approved these changes 2025-02-14 05:03:04 -06:00
peterharperuk (Migrated from github.com) left a comment

Ok. After staring at this for awhile it looks good. We really should have an example of using this. Any suggestions?

Ok. After staring at this for awhile it looks good. We really should have an example of using this. Any suggestions?
Sign in to join this conversation.
No reviewers
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!2265
No description provided.