I am using RP2350 for my project and I could not use GPIO 32 and above as input, no matter what I've tried.
Code:Note that I do not connect anything to the GPIO, this is just example, I use internal pullups and then essentially read them. This is just example, driving pins to 3.3V has exactly the same behavior.
The code above works just fine, prints:
However, should I change PIN_DEBUG to 32 or anything above, I get:
I understand there is an issue with GPIO32+ for PIO, but I am not using that. I am simply unable to read a pin, nor set up an interrupt for it.
What am I missing? RP3250 doesn't have any GPIO banks does it? Do I need to example something? Could somebody provide a code that pulls pin 32 high and reads it and it reads as 1?
I use pga2350 dev board, but I have also built a custom pcb with the chip and have the same behavior.
Thanks.
Code:
Code:
#include <stdio.h>#include "pico/stdlib.h"#define PIN_DEBUG 31int main(){ stdio_init_all(); gpio_init(PIN_DEBUG); gpio_set_function(PIN_DEBUG, GPIO_FUNC_SIO); gpio_set_dir(PIN_DEBUG, GPIO_IN); gpio_pull_up(PIN_DEBUG); stdio_uart_init_full(uart0, 9600, 0, 1); printf("Initialized!\n"); while (true) { bool d = gpio_get(PIN_DEBUG); printf("GPIO%d level: %d\n", PIN_DEBUG, d); sleep_ms(500); }}The code above works just fine, prints:
Code:
GPIO31 level: 1GPIO31 level: 1GPIO31 level: 1GPIO31 level: 1Code:
GPIO32 level: 0GPIO32 level: 0GPIO32 level: 0GPIO32 level: 0What am I missing? RP3250 doesn't have any GPIO banks does it? Do I need to example something? Could somebody provide a code that pulls pin 32 high and reads it and it reads as 1?
I use pga2350 dev board, but I have also built a custom pcb with the chip and have the same behavior.
Thanks.
Statistics: Posted by desertkun — Thu May 15, 2025 11:29 pm