Skip to content

pio_encode_wait_gpio does not respect gpiobase=16 #2377

@qdotme

Description

@qdotme

Consider the following (equivalent) blocks - one stalling on PIO, one on SIO. Got it to working by manually substracting the 16 from the GPIO pin number (pin_vsync = 45 in my design).

The PIO is correctly configured for supporting gpio_base=16, compiling the pioasm instructions correctly - but not when generated through pio_encode_wait_gpio

#if 1
pio_sm_exec(config->pio, config->pio_sm, 
	pio_encode_wait_gpio(1, config->pin_vsync - 16));
#else
while (gpio_get(config->pin_vsync) == 0);
#endif 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions