Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB suspend not implemented #544

Open
Dakkaron opened this issue Sep 12, 2023 · 0 comments
Open

USB suspend not implemented #544

Dakkaron opened this issue Sep 12, 2023 · 0 comments

Comments

@Dakkaron
Copy link

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

//USB_ClockEnable();
and
//USB_ClockDisable();
), but both aren't actually activated.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant