Skip to content

Commit 0289dec

Browse files
mathieuchopstmnashif
authored andcommitted
samples: board: st: wkup_pins: configure the GPIO pin as input
Certain series (e.g., STM32WBA) require pins to be configured as input to behave properly as wake-up pins. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 91f19de commit 0289dec

File tree

1 file changed

+1
-1
lines changed
  • samples/boards/st/power_mgmt/wkup_pins/src

1 file changed

+1
-1
lines changed

samples/boards/st/power_mgmt/wkup_pins/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main(void)
3232
gpio_pin_set(led.port, led.pin, 1);
3333

3434
/* Setup button GPIO pin as a source for exiting Poweroff */
35-
gpio_pin_configure_dt(&button, STM32_GPIO_WKUP);
35+
gpio_pin_configure_dt(&button, GPIO_INPUT | STM32_GPIO_WKUP);
3636

3737
printk("Will wait %ds before powering the system off\n", (WAIT_TIME_US / 1000000));
3838
k_busy_wait(WAIT_TIME_US);

0 commit comments

Comments
 (0)