Skip to content

Commit 322ad6d

Browse files
authored
Merge pull request #10038 from bablokb/cyw43_nodelay
removed delay before init of cyw43
2 parents 2e885ac + 5324f46 commit 322ad6d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

ports/raspberrypi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ CFLAGS_CYW43 := \
3232
-DCYW43_USE_STATS=0 \
3333
-DPICO_BUILD \
3434
-DCYW43_ENABLE_BLUETOOTH=0 \
35+
-DCIRCUITPY_CYW43_INIT_DELAY=$(CIRCUITPY_CYW43_INIT_DELAY) \
3536
-DPICO_CYW43_ARCH_POLL=0
3637

3738
SRC_SDK_CYW43 := \

ports/raspberrypi/mpconfigport.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ CIRCUITPY_ALARM ?= 1
5353
CIRCUITPY_PICODVI ?= 0
5454

5555
CIRCUITPY_TOUCHIO ?= 1
56+
57+
# delay in ms before calling cyw43_arch_init_with_country
58+
CIRCUITPY_CYW43_INIT_DELAY ?= 1000
5659
endif
5760

5861
ifeq ($(CHIP_VARIANT),RP2350)
@@ -65,6 +68,9 @@ CIRCUITPY_PICODVI ?= 1
6568
# So, turn touchio off because it doesn't work.
6669
CIRCUITPY_TOUCHIO = 0
6770

71+
# delay in ms before calling cyw43_arch_init_with_country
72+
CIRCUITPY_CYW43_INIT_DELAY ?= 0
73+
6874
# Audio effects
6975
CIRCUITPY_AUDIOEFFECTS ?= 1
7076
endif

ports/raspberrypi/supervisor/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ safe_mode_t port_init(void) {
361361
// initializing the cyw43 chip. Delays inside cyw43_arch_init_with_country
362362
// are intended to meet the power on timing requirements, but apparently
363363
// are inadequate. We'll back off this long delay based on future testing.
364-
mp_hal_delay_ms(1000);
364+
mp_hal_delay_ms(CIRCUITPY_CYW43_INIT_DELAY);
365365

366366
// Change this as a placeholder as to how to init with country code.
367367
// Default country code is CYW43_COUNTRY_WORLDWIDE)

0 commit comments

Comments
 (0)