-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Pins greater than 32 use PIO functions #2051
Comments
Duplicate #2030 |
Sorry, misread your post. I'll check if we're missing something else. |
@Octopus1633 I've tested this and it works fine. You do NOT need to take 16 off the pin when running the hello_pio program. You don't even have to call pio_set_gpio_base as the call to pio_claim_free_sm_and_add_program_for_gpio_range does that for you. The following pio function are called in this program and they all correctly handle pins >= 32 Just make sure you are testing on a board that does NOT set PICO_RP2350A 1 |
@peterharperuk Thank you for your reply. You mean to use the hello_pio program, only need to specify HELLO_PIO_LED_PIN pin to work properly? But after I modified it, I still can't make the pin greater than 32 work properly, and this is the case for two RP2350Bs. I updated the latest SDK and sample program.But if they are just used as ordinary IO to output high and low levels, they can all work normally. This confuses me. |
Yes, this program seems to work for me if I use pin 45. What board are you using? Can you double check that HELLO_PIO_LED_PIN is set correctly and PICO_PIO_USE_GPIO_BASE is true? I will add the following to the test. #if HELLO_PIO_LED_PIN >= 32 && !PICO_PIO_USE_GPIO_BASE |
That was the problem. No matter I set pio_set_gpio_base(pio,16); or not, the PICO_PIO_USE_GPIO_BASE output was always 0, and when I specified 1, everything worked fine! |
If |
It's not very obvious I guess. I'll add some checks to the examples which will hopefully clarify things. |
Hello, I am testing the hello_pio program. And I am using the RP2350B development board. I want to use pin 45 to output high and low levels alternately.
I tried adding
and changing the pin to 45
and found that the pin did not respond.
Then I tried to change the pin to a relative value
Still no response, why is this?
The text was updated successfully, but these errors were encountered: