Fix LFCLK initialization on nRF#85
Conversation
| /*!nrf_clock_lf_is_running(NRF_CLOCK)) {*/ | ||
| } | ||
| nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_LFCLKSTARTED); | ||
| } |
There was a problem hiding this comment.
this should time out after some time and sadwatch (or TODO for that) if LFXO fails to come up
There was a problem hiding this comment.
Hmm, even nrfx doesn't time out:
Assuming bootloader will leave WDT on, if this fails the system will reboot anyway. If this fails, we're in trouble as well (e.g. BLE won't work at all). Not sure if BLE SCA can be adjusted at runtime, so we could potentially fall back to a calibrated LF RC.
There was a problem hiding this comment.
Yeah, this was on previous Pebbles to mark hardware failure (usually water incursion). Boot cannot proceed but providing the correct error code explicitly (by triggering a sadwatch) can help diagnose the failure.
There was a problem hiding this comment.
I've added a comment for now if that's ok
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
It is no longer used. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
We should really have a platform level init code, it's not strictly board specific, but this can come later.