Skip to content

USB suspend not implemented #544

Open
@Dakkaron

Description

@Dakkaron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions