Skip to content

Add an additional large delay time at start for pico w boards #7313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ports/raspberrypi/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "src/rp2_common/hardware_sync/include/hardware/sync.h"
#include "src/rp2_common/hardware_timer/include/hardware/timer.h"
#if CIRCUITPY_CYW43
#include "py/mphal.h"
#include "pico/cyw43_arch.h"
#endif
#include "src/common/pico_time/include/pico/time.h"
Expand Down Expand Up @@ -143,6 +144,11 @@ safe_mode_t port_init(void) {
never_reset_pin_number(24);
never_reset_pin_number(25);
never_reset_pin_number(29);
// A small number of samples of pico w need an additional delay before
// initializing the cyw43 chip. Delays inside cyw43_arch_init_with_country
// are intended to meet the power on timing requirements, but apparently
// are inadequate. We'll back off this long delay based on future testing.
mp_hal_delay_ms(1000);
// Change this as a placeholder as to how to init with country code.
// Default country code is CYW43_COUNTRY_WORLDWIDE)
if (cyw43_arch_init_with_country(PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE)) {
Expand Down