We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d21fdd9 + 6af4ee2 commit de112b0Copy full SHA for de112b0
1 file changed
src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -1049,6 +1049,12 @@ void tusb_hal_nrf_power_event(uint32_t event) {
1049
NVIC_EnableIRQ(USBD_IRQn);
1050
}
1051
1052
+ // Ensure HFCLK is requested in the current context. The hfclk_enable() in
1053
+ // USB_EVT_DETECTED may have been pre-SoftDevice. After Softdevice is
1054
+ // enabled, HFXO is physically off again. So any caller that fires
1055
+ // USB_EVT_READY post-SD would hang here.
1056
+ hfclk_enable();
1057
+
1058
// Wait for HFCLK
1059
while (!hfclk_running()) {}
1060
0 commit comments