Datasheet

266
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
The “Session_valid” signal is active high when the voltage on the UVBUS pad is higher or equal to 1.4V. If
lower than 1.4V, the signal is not active
The VBUS status bit is set when “Session_valid” signal is active (VBUS > 1.4V)
The VBUSTI flag is set each time the VBUS state changes
The USB peripheral cannot attach to the bus while VBUS bit is not set
21.12 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