Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5266

SDK • Re: PIO rp2350 with GPIO >32

$
0
0
It turns out that the sequence of adding the program and setting the GPIO base was the issue. I moved the GPIO base setting earlier, and everything started working.

Code:

  PIO pio = pio2;  uint sm = 0;  pio_set_gpio_base(pio, 16);  uint offset = pio_add_program(pio, &control_bus_program);  pio_sm_config c = control_bus_program_get_default_config(offset);  sm_config_set_in_pin_base(&c, 32);

2 functions in question

Code:

static bool is_gpio_compatible(PIO pio, uint32_t used_gpio_ranges)static int pio_set_gpio_base_unsafe(PIO pio, uint gpio_base) 
Something weird is happening with detecting the GPIO ranges used in the PIO program in relation to the GPIO base. As I understand it, some checks need to be performed to determine which GPIO ranges are used in the PIO program and how they relate to the base settings.

Statistics: Posted by sh71rlic — Wed Nov 06, 2024 3:41 am



Viewing all articles
Browse latest Browse all 5266

Trending Articles