Datasheet
2017 Microchip Technology Inc. DS60001516A-page 669
SAM9G20
• TXPKTRDY has already been set:
- Clear TXPKTRDY and read it back until actually read at 0.
- Set TXPKTRDY and read it back until actually read at 1.
- Clear TXPKTRDY so that no packet is ready to be sent.
- Reset the endpoint to clear the FIFO (pointers). (See Section 36.6.9 ”UDP Reset Endpoint Register”.)
36.5.3 Controlling Device States
A USB device has several possible states. Refer to Chapter 9 of the Universal Serial Bus Specification, Rev 2.0.
Figure 36-14: USB Device State Diagram
Movement from one state to another depends on the USB bus state or on standard requests sent through control transactions via the
default endpoint (endpoint 0).
After a period of bus inactivity, the USB device enters Suspend Mode. Accepting Suspend/Resume requests from the USB host is man-
datory. Constraints in Suspend Mode are very strict for bus-powered applications; devices may not consume more than 500 µA on the
USB bus.
While in Suspend Mode, the host may wake up a device by sending a resume signal (bus activity) or a USB device may send a wake up
request to the host, e.g., waking up a PC by moving a USB mouse.
The wake up feature is not mandatory for all devices and must be negotiated with the host.
Attached
Suspended
Suspended
Suspended
Suspended
Hub Reset
or
Deconfigured
Hub
Configured
Bus Inactive
Bus Activity
Bus Inactive
Bus Activity
Bus Inactive
Bus Activity
Bus Inactive
Bus Activity
Reset
Reset
Address
Assigned
Device
Deconfigured
Device
Configured
Powered
Default
Address
Configured
Power
Interruption