You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using an ATmega32u4, but the issue seems to affect all devices.
According to the manual for that chip, the software is supposed to freeze the USB clock and optionally switch to the internal clock whenever it receives an USB suspend interrupt (SUSPI), and revert whenever it receives the USB wakeup interrupt (WAKEUPI). (Section 6.10 of the manual).
The USB core hints at that. It has the functions USB_ClockDisable() and USB_ClockEnable(), which are referenced in a TODO comment in the ISR (see
Since the USBCore doesn't properly implement suspending, the host device needs to always keep its USB driver active and wakelocking, no matter if the USB connection is actually used. This causes significant battery drain in battery-powered devices.
It would be highly appreciated if this function is implemented.
The text was updated successfully, but these errors were encountered:
I'm using an ATmega32u4, but the issue seems to affect all devices.
According to the manual for that chip, the software is supposed to freeze the USB clock and optionally switch to the internal clock whenever it receives an USB suspend interrupt (SUSPI), and revert whenever it receives the USB wakeup interrupt (WAKEUPI). (Section 6.10 of the manual).
The USB core hints at that. It has the functions USB_ClockDisable() and USB_ClockEnable(), which are referenced in a TODO comment in the ISR (see
ArduinoCore-avr/cores/arduino/USBCore.cpp
Line 791 in 6309212
ArduinoCore-avr/cores/arduino/USBCore.cpp
Line 800 in 6309212
Since the USBCore doesn't properly implement suspending, the host device needs to always keep its USB driver active and wakelocking, no matter if the USB connection is actually used. This causes significant battery drain in battery-powered devices.
It would be highly appreciated if this function is implemented.
The text was updated successfully, but these errors were encountered: