Skip to content

Commit 412c62f

Browse files
committed
Set cyw43 power management to disabled at boot time
1 parent 60d10b4 commit 412c62f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ports/raspberrypi/bindings/cyw43/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const mp_obj_type_t cyw43_pin_type = {
5454
//| PM_PERFORMANCE: int
5555
//| """Performance power management mode where more power is used to increase performance"""
5656
//| PM_DISABLED: int
57-
//| """Disable power management and always use highest power mode"""
57+
//| """Disable power management and always use highest power mode. CircuitPython sets this value at reset time, because it provides the best reliability."""
5858
//|
5959
//| def set_power_management(value: int) -> None:
6060
//| """Set the power management register

ports/raspberrypi/supervisor/port.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include "src/rp2_common/hardware_timer/include/hardware/timer.h"
6060
#if CIRCUITPY_CYW43
6161
#include "pico/cyw43_arch.h"
62+
#include "bindings/cyw43/__init__.h"
6263
#endif
6364
#include "src/common/pico_time/include/pico/time.h"
6465
#include "src/common/pico_binary_info/include/pico/binary_info.h"
@@ -139,6 +140,8 @@ safe_mode_t port_init(void) {
139140
if (cyw43_arch_init()) {
140141
serial_write("WiFi init failed\n");
141142
} else {
143+
cyw43_wifi_pm(&cyw43_state, PM_DISABLED);
144+
142145
cyw_ever_init = true;
143146
}
144147
#endif

0 commit comments

Comments
 (0)