Author Topic: Problem with USB enumeration process  (Read 24720 times)

irenas

  • Member
  • ***
  • Posts: 3
Problem with USB enumeration process
« on: August 19, 2010, 08:18:08 am »
We are working with TI MSP430F5528 MCU.

Our issue is as following:

Device works correctly when we first power up the external power supply, and after few seconds we connect the USB cable.

When powering up the external power supply with the USB cable connected, we enter the boot strap loader that extists in the MCU (device powers ups as bootloader, not our device).
The boot loader is entered by setting lines in high/low state in a specific order. Why does it happen on power up, when USB cable is connected (does not happen without USB cable).

In both cases, when we power down the external power supply, in device management window, the device doesn't disappear, but becomes with yellow triangle and read mark.

What can cause this USB problem? What part of connection still exists that prevents device from disapearing from the device management window?

Please advice.

Thank you in advance.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Problem with USB enumeration process
« Reply #1 on: August 19, 2010, 09:44:59 pm »
What lines cause the device to run the bootloader firmware? External I/O pins? Connected to what? Monitored by firmware?

The device remains in the Device Manager because the host detects the presence of a device on the data lines.

Jan

irenas

  • Member
  • ***
  • Posts: 3
Re: Problem with USB enumeration process
« Reply #2 on: August 19, 2010, 11:47:14 pm »
Bootloader is entered by external IO pins, though we do not intentionally change their state. This only happens when power up the device with USB cable connected. We know that bootloader is entered by its PID and VID we see in the device manager, they are specific to the TI bootloader.

You say that "The device remains in the Device Manager because the host detects the presence of a device on the data lines". This means that MCU does not necessarily sends data to HOST in order to be detected, the mere DP, DM lines are enough to sense the device and show it on the Device Manager?

By the way, Ian, I'm a big fan of yours ever since my first USB project about 8 years ago and we did it by your book "USB Complete".

Thank you for reply.

Irena

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Problem with USB enumeration process
« Reply #3 on: August 21, 2010, 09:58:34 am »
that MCU does not necessarily sends data to HOST in order to be detected, the mere DP, DM lines are enough to sense the device and show it on the Device Manager?

I think so but can't say for sure off hand.

I would suggest using whatever debugging tools you have (breakpoints, watch variables, debug messages, etc.) to monitor what your firmware is doing on power up. Is it detecting the sequence on the I/O pins or is it following another path in code to select the bootloader firmware?

I'm glad to hear you've found my writing helpful!

Jan

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: Problem with USB enumeration process
« Reply #4 on: August 26, 2010, 12:27:37 am »
Hi Irena and Jan,

Sound like leakage current from VUSB power rail disturbs the MCU core from power cycling on the external power supply. Check the voltage at DVcc pin (power supply to the core domain), while the external power supply is off, and USB cable is plugged in. Is the DVcc voltage less than BOR (Brown Out Reset) threshold (0.8V) ?

MSP430x5xx/x6xx family has specific configuration for power management.
It has separated power domain of USB from MCU core and other peripherals. The on-chip 3V3 regulator belongs to USB power domain, not to the core domain. While it is supplied by VBUS pin, the regulator always sources USB transceiver (including D+ pull-up) as the default, regardless the core domain is supplied or not. It is the reason why the device doesn't disappear from the Device Manager after power down of the external power source.

I suppose this scenario.
While USB is plugged in, VUSB pin sources the regulator output. Passing through some component(s) on your board, leakage current from VUSB rail drives the port pin(s) of the MCU. The leakage current flows into DVcc rail and MCU core across the clamp diodes of the ports. This leakage current causes the unexpected behavior at power cycling.

Tsuneo

Ron Hemphill

  • Member
  • ***
  • Posts: 19
Re: Problem with USB enumeration process
« Reply #5 on: August 26, 2010, 10:48:36 am »
Off-topic:
Hey Tsuneo - It's great to see you on Jan's site!  Your wise advice will definitely be appreciated.

renan

  • Member
  • ***
  • Posts: 10
Re: Problem with USB enumeration process
« Reply #6 on: August 26, 2010, 02:28:11 pm »
This is good!