diff options
| -rw-r--r-- | ports/rp2/modmachine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/rp2/modmachine.c b/ports/rp2/modmachine.c index 9cc15080c..2cc79369f 100644 --- a/ports/rp2/modmachine.c +++ b/ports/rp2/modmachine.c @@ -138,7 +138,8 @@ static void mp_machine_lightsleep(size_t n_args, const mp_obj_t *args) { #if MICROPY_HW_ENABLE_USBDEV // Only disable the USB clock if a USB host has not configured the device - bool disable_usb = !tud_mounted(); + // or if going to DORMANT mode. + bool disable_usb = !(tud_mounted() && n_args > 0); #else bool disable_usb = true; #endif |
