Skip to content
Snippets Groups Projects
Commit e3f604aa authored by Jakub Vaněk's avatar Jakub Vaněk
Browse files

Merge branch 'bugfix/longer-osc-stab' into 'main'

Add hack for raising oscillator startup delay

See merge request !10
parents 5e46dd82 38ae2641
No related branches found
No related tags found
1 merge request!10Add hack for raising oscillator startup delay
Pipeline #77338 passed
......@@ -16,6 +16,8 @@ build micropython firmware:
- make -C micropython/mpy/ports/rp2 submodules
# HACK: patch a bug in Pico SDK (https://github.com/raspberrypi/pico-sdk/issues/737)
- patch -p1 --forward -i micropython/timer-bug.patch
# HACK: wait longer for oscillator initialization
- patch -p1 --forward -i micropython/xosc-wait.patch
- make -C micropython/mpy/mpy-cross -j $(nproc)
- make -C micropython/mpy/ports/rp2 clean
- make -C micropython/mpy/ports/rp2 USER_C_MODULES=$(pwd)/micropython/modules/micropython.cmake -j $(nproc)
......
--- a/micropython/mpy/lib/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h
+++ b/micropython/mpy/lib/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h
@@ -14,9 +14,9 @@
// Allow lengthening startup delay to accommodate slow-starting oscillators
// PICO_CONFIG: PICO_XOSC_STARTUP_DELAY_MULTIPLIER, Multiplier to lengthen xosc startup delay to accommodate slow-starting oscillators, type=int, min=1, default=1, group=hardware_xosc
-#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
-#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 1
-#endif
+// HACK: raised here to work around flash chip issues
+#undef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
+#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 100
#ifdef __cplusplus
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment