-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I wonder how this can be right:
pico-sdk/src/rp2_common/hardware_powman/powman.c
Lines 100 to 111 in 550aa09
static void powman_timer_use_gpio(uint32_t gpio, uint32_t use, uint32_t using) { | |
bool was_running = powman_timer_is_running(); | |
if (was_running) powman_timer_stop(); | |
invalid_params_if(HARDWARE_POWMAN, !((gpio == 12) || (gpio == 14) || (gpio == 20) || (gpio == 22))); | |
gpio_set_input_enabled(gpio, true); | |
powman_write(&powman_hw->ext_time_ref, gpio); | |
powman_set_bits(&powman_hw->timer, use); | |
if (was_running) { | |
powman_timer_start(); | |
while(!(powman_hw->timer & using)); | |
} | |
} |
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working