SoftConnect not working sometimes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SoftConnect not working sometimes

1,343 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalfalfa on Fri Nov 30 15:39:01 MST 2012
Hi,

I have several boards where the SoftConnect functionality does not work. All using LPC1343. All of our designs use the same proccessor and the same circuit for softconnect for bringing up D+ through a 1.5K resistor, but on some board, sending the DEV_CON message to the SIE does not cause the USB_CONNECT pin to switch. I am forced to drive this pin directly in order to connect to USB.

My question: what is the difference between controlling the USB_CONNECT pin directly and allowing the SIE to control it via the DEV_CON message?

Another question: why would this functionality not be working on only some boards? Could this be bad LPC1343 chips? All of my prototype debug boards worked fine, and I discovered this problem when we built up some gold boards to go to production.

Finally: On the board where softconnect does not work, USB Reset also does not work - when the PC sends a reset message, I don't receive an interrupt. The effect of this is that a working board plugged into a computer will stop working after a Reset message and need to be physically unplugged. This happens if the computer is rebooted and power doesn't get turned off to the USB.

-Patrick
0 Kudos
Reply
7 Replies

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalfalfa on Wed Dec 05 16:22:48 MST 2012
Thanks again for the help. All is working properly now.

-Patrick
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Tue Dec 04 13:38:40 MST 2012

Quote:
Our board are bus-powered, and I have tried leaving PIO0_3 configured as GPIO, but in this case USB never connects, so I don't think it provides VDD to the detection circuitry internally.

Silicon bug?
UM10375 User manual describes this feature clearly.

[I]10.8 Pin description
VBUS: VBUS status input. [B]When this function is not enabled via its corresponding IOCONFIG register, it is driven HIGH internally.[/B][/I]

The errata of LPC1343 doesn't list up this bug yet.
But historically, since the age of LPC214x, this feature has often suffered silicon bug ;-)


Quote:
Do you think it's safe to rely on the internal pin pullup for VBUS detection

If your board has just short trace from USB_VBUS pin, internal pull-up will do.

Tsuneo
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalfalfa on Tue Dec 04 11:33:10 MST 2012
Hi,

On our design VCC is USB VBUS (+5V) - and we do have a resistor. This part of the circuit just got missed when going to the gold board.

I'm interested in your advise about not having to use USB_VBUS when the board is bus-powered. Our board are bus-powered, and I have tried leaving PIO0_3 configured as GPIO, but in this case USB never connects, so I don't think it provides VDD to the detection circuitry internally.

However, I have noticed that if I enable the USB_VBUS function, and also enable the pin pullup - PIO0_3 = 0xD1 - then it will behave as if it detect USB voltage even if the pin is not connected. Before, I was not using the pull-up, but I noticed that the ROM USB driver configures this pin with a pullup, and that USB stack was working properly - it's just my stack which was not working.

Do you think it's safe to rely on the internal pin pullup for VBUS detection, or could this fail sometimes?

-Patrick
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalfalfa on Tue Dec 04 11:23:26 MST 2012
Hi,

On our design VCC is USB VBUS (+5V) - and we do have a resistor. This part of the circuit just got missed when going to the gold board.

I'm interested in your advise about not having to use USB_VBUS when the board is bus-powered. Our board are bus-powered, and I have tried leaving PIO0_3 configured as GPIO, but in this case USB never connects, so I don't think it provides VDD to the detection circuitry internally.

However, I have noticed that if I enable the USB_VBUS function, and also enable the pin pullup - PIO0_3 = 0xD1 - then it will behave as if it detect USB voltage even if the pin is not connected. Before, I was not using the pull-up, but I noticed that the ROM USB driver configure this pin with a pullup, and that USB stack was working properly.

Do you think it's safe to rely on the internal pin pullup for VBUS detection, or could this fail sometimes?

-Patrick
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Mon Dec 03 18:21:31 MST 2012

Quote: kalfalfa
Is this behavior documented anywhere?


Yeh, it's described in CON bit of "Set Device Status" on UM10375 User manual, as follows

10.11.7 Set Device Status
0 CON
The Connect bit indicates the current connect status of the device. It controls the CONNECT output pin, used for SoftConnect. Reading the connect bit returns the current connect status. This bit is cleared by hardware when the VBUS status input is LOW for more than 3 ms. The 3 ms delay filters out temporary dips in the VBUS voltage.



Quote: kalfalfa
Attaching USB_VBUS to VCC fixes the issue.


It isn't a good fix.

If your board is self-powered, connect MCU USB_VBUS pin to the VBUS (5V) pin of the USB connector over a protection resistor. It makes your board compliant to the USB spec.

If your board is bus-powered, you may do without this connection. Instead, don't select USB_VBUS at IOCON_PIO0_3.FUNC bit at the initialization. This setting internally provides VDD to the VBUS detection circuitry.

Tsuneo
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalfalfa on Mon Dec 03 10:58:01 MST 2012
Thank you!!

Is this behavior documented anywhere? It looks like a pullup was deleted from the design between prototype -> gold board stages for some reason. Attaching USB_VBUS to VCC fixes the issue.

-Patrick
0 Kudos
Reply

1,285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Sat Dec 01 08:21:43 MST 2012
> what is the difference between controlling the USB_CONNECT pin directly and allowing the SIE to control it via the DEV_CON message?


After enabling USB_CONNECT by Set Device Status command - CON bit (DEV_CON message), the SIE watches voltage at USB_VBUS pin. If the VBUS pin is low for 3ms, the SIE drops USB_CONNECT.

Does the USB_VBUS pin connect to the VBUS (5V) pin of the USB connector?

Tsuneo
0 Kudos
Reply