Skip to content

Commit 295f7b4

Browse files
authored
Merge pull request #7313 from jepler/cyw43-additional-delay
Add an additional large delay time at start for pico w boards
2 parents 44af052 + ff8d051 commit 295f7b4

File tree

1 file changed

+6
-0
lines changed
  • ports/raspberrypi/supervisor

1 file changed

+6
-0
lines changed

ports/raspberrypi/supervisor/port.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include "src/rp2_common/hardware_sync/include/hardware/sync.h"
6363
#include "src/rp2_common/hardware_timer/include/hardware/timer.h"
6464
#if CIRCUITPY_CYW43
65+
#include "py/mphal.h"
6566
#include "pico/cyw43_arch.h"
6667
#endif
6768
#include "src/common/pico_time/include/pico/time.h"
@@ -143,6 +144,11 @@ safe_mode_t port_init(void) {
143144
never_reset_pin_number(24);
144145
never_reset_pin_number(25);
145146
never_reset_pin_number(29);
147+
// A small number of samples of pico w need an additional delay before
148+
// initializing the cyw43 chip. Delays inside cyw43_arch_init_with_country
149+
// are intended to meet the power on timing requirements, but apparently
150+
// are inadequate. We'll back off this long delay based on future testing.
151+
mp_hal_delay_ms(1000);
146152
// Change this as a placeholder as to how to init with country code.
147153
// Default country code is CYW43_COUNTRY_WORLDWIDE)
148154
if (cyw43_arch_init_with_country(PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE)) {

0 commit comments

Comments
 (0)