Datasheet
265
7766F–AVR–11/10
ATmega16/32U4
21.13 USB Software Operating modes
Depending on the USB operating mode, the software should perform some the following
operations:
Power On the USB interface
• Power-On USB pads regulator
• Configure PLL interface
•Enable PLL
• Check PLL lock
• Enable USB interface
• Configure USB interface (USB speed, Endpoints configuration...)
• Wait for USB VBUS information connection
• Attach USB device
Power Off the USB interface
• Detach USB interface
• Disable USB interface
• Disable PLL
• Disable USB pad regulator
Suspending the USB interface
• Clear Suspend Bit
• Freeze USB clock
• Disable PLL
• Be sure to have interrupts enable to exit sleep mode
• Make the MCU enter sleep mode
Resuming the USB interface
•Enable PLL
• Wait PLL lock
• Unfreeze USB clock
• Clear Resume information