I'm working using the TM4C123GH6PM ARM Cortex-M4F MCU and have some
difficulties understanding how to handle the USB0VBUS signal on a self-powered
device.
From the System Design Guidelines for the TM4C123x (SPMA059) I copied the
following:
For TM4C123x devices that are used in a device-only configuration, the only
signal used in addition to USB0DM and USB0DP is USB0VBUS, which is located on
port PB1. In USB device-only mode, USB0VBUS is used to detect when voltage has
been applied to or removed from the USB connector, which triggers software to
manage the internal USB PHY accordingly. When configured as USB2VBUS, this pin
is 5-V tolerant. However, when used as a GPIO input, PB1 is NOT 5-V tolerant.
An alternate 5-V tolerant Fail-Safe GPIO should be selected to do the VBUS
detection if there is a chance 5V could be applied to the input prior to PB1 on
the TM4C123x device being configured for VBUS, such as during power-up, while
the device is in reset, and the while the initial boot sequence executes.
For a USB device-only configuration, a 100Ω resistor should be placed in series
between VBUS on the USB connector and PB1 (or alternate 5-V tolerant GPIO) on
the microcontroller in order to limit damage caused by any ESD events.
If PB1 must be used for a function other than USB0VBUS, any other available 5-V
tolerant Fail-Safe GPIO could be used in its place.
I checked the schematics of both the EK-TM4C123GXL and the EK-TM4C1294XL
LaunchPads and found the following:
On the EK-TM4C123GXL Tiva C Series LaunchPad, USB_VBUS of the device connector
(J9) is routed to pin PB1 of the microcontroller (U1) via a 0-ohm resistor R29.
However, R29 is not populated. Because of this, the application does not receive any
USB_EVENT_DISCONNECTED event but (with very limited testing) the application seems
to work just fine.
Also on the EK-TM4C123GXL, USB_VBUS of the ICDI connector (J11) is connected to
pin PB1 of the debugger microcontroller (U2) via a 330-ohm resistor. The ICDI is
always a Bus-Powered Device.
On the EK-TM4C1294XL LaunchPad the ICDI is also a TM4C123GH6PM. Here the
USB_VBUS is routed to a voltage divider of a 5.6k and a 10k ohm resistor;
reducing the voltage at PB1 to nominal 3.2 V.
What is the recommended way for handling the USB0VBUS? In particular during power-up, or when VBUS can be applied before MCU VCC? Is the voltage divider used in the EK-TM4C1294XL the way to go?