From 174cafc31a7e705fc54c175c667811aece1d9df3 Mon Sep 17 00:00:00 2001 From: Peter Harper <77111776+peterharperuk@users.noreply.github.com> Date: Wed, 23 Apr 2025 20:02:06 +0100 Subject: [PATCH] Add CYW43_WL_GPIO_SMPS_PIN for pico_w and pico2_w (#2410) Fixes #2361 --- src/boards/include/boards/pico2_w.h | 6 ++++++ src/boards/include/boards/pico_w.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/boards/include/boards/pico2_w.h b/src/boards/include/boards/pico2_w.h index 74f5a739..32bc4a53 100644 --- a/src/boards/include/boards/pico2_w.h +++ b/src/boards/include/boards/pico2_w.h @@ -89,6 +89,12 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #define CYW43_WL_GPIO_LED_PIN 0 #endif +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) +// As this is a CYW43 pin you can do this by calling cyw43_gpio_set +#ifndef CYW43_WL_GPIO_SMPS_PIN +#define CYW43_WL_GPIO_SMPS_PIN 1 +#endif + // If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS. // This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered. // PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined. diff --git a/src/boards/include/boards/pico_w.h b/src/boards/include/boards/pico_w.h index 6e825f68..670cb305 100644 --- a/src/boards/include/boards/pico_w.h +++ b/src/boards/include/boards/pico_w.h @@ -94,6 +94,12 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #define CYW43_WL_GPIO_LED_PIN 0 #endif +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) +// As this is a CYW43 pin you can do this by calling cyw43_gpio_set +#ifndef CYW43_WL_GPIO_SMPS_PIN +#define CYW43_WL_GPIO_SMPS_PIN 1 +#endif + // If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS. // This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered. // PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.