Skip to content

PIO gpiobase not set with pin >= 32 #2030

@sfe-SparkFro

Description

@sfe-SparkFro

I tried running the PIO WS2812 example with an RP2350B, and found that the LED does not work when using a GPIO pin >=32. After some digging, it appears the root problem is that the pio->gpiobase is not getting set to 16. If I manually set the value, it works fine with GPIO pins >= 32.

Where is the correct place for gpiobase to be set? I put the following check into pio_sm_set_consecutive_pindirs() which worked for me, but I'm guessing it may be better to go somewhere else.

if(pin > 31 && pio_get_gpio_base(pio) == 0)
    pio->gpiobase = 0x10;

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions