powman_timer_use_gpio writing wrong value to ext_time_ref register?
I wonder how this can be right:
https://github.com/raspberrypi/pico-sdk/blob/550aa09624391dfbc3afae55ede3e008a3879614/src/rp2_common/hardware_powman/powman.c#L100-L111
According to the RP2350 datasheet:
... ext_time_ref does not directly take the GPIO number (12, 20, 14, 22), but is an enum (0 ... 3). However, the function above writes the GPIO number directly into the register.
https://github.com/raspberrypi/pico-sdk/blob/develop/src/rp2350/hardware_regs/include/hardware/regs/powman.h#L1180 seems to agree - looks like you might have found a bug? It's probably just reading the lower 2 bits of the GPIO value, so trying to set either 12 or 20 will result in GPIO12 being selected, and trying to set 14 or 22 will result in GPIO14 being selected.
fix merged into develop