CHAPTER 17 USB FUNCTION
17.4.6
Detection of USB Connector Connection and
Disconnection
The USB function cannot detect whether the USB connector is connected . Connection
and disconnection of USB connector must be detected by the method described below.
■ Detection of USB Connector Connection and Disconnection
The USB function cannot use the D+ or D- signal to determine whether the USB connector is
connected.
Whether the USB connector is connected must be determined by detecting VBUS outside of the
macro program.
•
When the connector is connected: VBUS = 5 V
•
When the connector is not connected: VBUS = 0 V
A possible method is to detect changes of VBUS on the board and generate interrupts to the
MPU.
When connection of the USB connector is detected, the USB function macro program must be
reset.
446