gpio_init_mask does not initialize GPIOs 32-47 on RP2350B #2643

Closed
opened 2025-09-02 04:48:29 -05:00 by romain145 · 2 comments
romain145 commented 2025-09-02 04:48:29 -05:00 (Migrated from github.com)

github.com/raspberrypi/pico-sdk@a1438dff1d/src/rp2_common/hardware_gpio/gpio.c (L283)

The gpio_mask is a uint, which is 32 bits. I suspect GPIOs above 31 are initialized incorrectly on RP2350B.

https://github.com/raspberrypi/pico-sdk/blob/a1438dff1d38bd9c65dbd693f0e5db4b9ae91779/src/rp2_common/hardware_gpio/gpio.c#L283 The gpio_mask is a uint, which is 32 bits. I suspect GPIOs above 31 are initialized incorrectly on RP2350B.
lurch commented 2025-09-02 05:54:11 -05:00 (Migrated from github.com)

Hmmm, maybe there ought to be a gpio_init_mask64 function, similar to the various other *_masked64 functions in that file?
(Also, perhaps it makes sense to change void gpio_init_mask(uint gpio_mask) to a more explicit void gpio_init_mask(uint32_t gpio_mask), in order to be consistent with all the other functions that take a gpio_mask parameter?)

Hmmm, maybe there ought to be a `gpio_init_mask64` function, similar to the various other `*_masked64` functions in that file? (Also, perhaps it makes sense to change `void gpio_init_mask(uint gpio_mask)` to a more explicit `void gpio_init_mask(uint32_t gpio_mask)`, in order to be consistent with all the other functions that take a `gpio_mask` parameter?)
kilograham commented 2026-05-14 11:07:47 -05:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
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#2643
No description provided.