Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions cores/rp2040/SerialUSB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,10 @@ void SerialUSB::checkSerialReset() {
__freertos_idle_other_core();
#endif
_ss.rebooting = true;
// Disable NVIC IRQ, so that we don't get bothered anymore
irq_set_enabled(USBCTRL_IRQ, false);
// Reset the whole USB hardware block
reset_block(RESETS_RESET_USBCTRL_BITS);
unreset_block(RESETS_RESET_USBCTRL_BITS);
// Delay a bit, so the PC can figure out that we have disconnected.
busy_wait_ms(3);
tud_disconnect();
busy_wait_ms(100);
reset_usb_boot(0, 0);
while (1); // WDT will fire here
while (1); // WDT will fire here, we will reboot to MSD
}
}

Expand Down