Increase default value of PICO_XOSC_STARTUP_DELAY_MULTIPLIER #2234
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#2234
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
change this by default to 6
Reasoning is:
The minimal change is just to bump the default provided here:
github.com/raspberrypi/pico-sdk@95ea6acad1/src/rp2_common/hardware_xosc/include/hardware/xosc.h (L18)To avoid impact on boot time, we could also pull the XOSC enable earlier in boot (e.g. in crt0, before
.dataand.bssinit) and then just poll duringxosc_init(). However this will be an incompatible change for those who are overriding the weakclocks_init()symbol without settingPICO_RUNTIME_SKIP_INIT_CLOCKS=1etc.Note
PICO_XOSC_STARTUP_DELAY_MULTIPLIERis poorly named and is really just the startup delay in milliseconds.I was the instigator of this long ago via #457. We (Adafruit) had chosen slightly different xosc parts and were having longer startup problems on a few boards. We didn't know how you were testing the Pico boards yourself and whether you were discarding some with longer delays as "bad". So this could improve your yield 😄 .
The default of 6 would still be too low for us, so we'll keep it at 64 for our boards, based on our empirical testing from that time.
Renaming is fine with us, of course. When I came up with the name it didn't occur to me (or the reviewers) that it was just milliseconds.
This is a board-dependent parameter and should be measured with appropriate test equipment. It is a function of the selected crystal, XOSC drive strength (but due to a hardware bug on RP2040, only the lowest one works), parallel loading capacitance, and series resistor. For information, the XOSC ripple counter will begin to count up very early in the crystal ramp - XIN will produce seemingly valid clock pulses with a tiny swing.
Ramp times for Pico and Pico 2 are basically identical. Your mileage will vary.
ok, so we should change it to 6 for just pico and pico2?
The ramp time is unlikely to be any faster on boards using our recommended crystal and layout. I would default to 6.
ok for RP2350 boards or all RP2040 boards too?
merged into develop