Skip to content

nRF52 BLE: wait for LFXO crystal before enabling SoftDevice (fixes t1000e hanging at reboot)#1939

Open
weebl2000 wants to merge 2 commits intomeshcore-dev:devfrom
weebl2000:wait-for-crystal-t1000e
Open

nRF52 BLE: wait for LFXO crystal before enabling SoftDevice (fixes t1000e hanging at reboot)#1939
weebl2000 wants to merge 2 commits intomeshcore-dev:devfrom
weebl2000:wait-for-crystal-t1000e

Conversation

@weebl2000
Copy link
Contributor

@weebl2000 weebl2000 commented Mar 6, 2026

The Adafruit framework starts the LFXO in init() but never waits for EVENTS_LFCLKSTARTED. On first boot the filesystem format (~600ms of page erases) gives the crystal time to stabilize. On subsequent boots only quick mounts happen, so sd_softdevice_enable() inside Bluefruit.begin() can be called while the crystal is still starting, which hangs indefinitely.

Poll EVENTS_LFCLKSTARTED before Bluefruit.begin() so the wait is exact rather than a blind delay.

fixes: #1780

Please try the firmware for yourself by building here.

The Adafruit framework starts the LFXO in init() but never waits for
EVENTS_LFCLKSTARTED. On first boot the filesystem format (~600ms of page
erases) gives the crystal time to stabilize. On subsequent boots only
quick mounts happen, so sd_softdevice_enable() inside Bluefruit.begin()
can be called while the crystal is still starting, which hangs
indefinitely.

Poll EVENTS_LFCLKSTARTED before Bluefruit.begin() so the wait is exact
rather than a blind delay.

fixes: meshcore-dev#1780
@weebl2000 weebl2000 changed the title nRF52 BLE: wait for LFXO crystal before enabling SoftDevice nRF52 BLE: wait for LFXO crystal before enabling SoftDevice (fixes t1000e hanging at reboot) Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant