Jump to content
43oh

USB Problem


Recommended Posts

I'm building a board using the 64-pin F5528 and I'm hoping to use the USB, but I'm not able to get it to connect properly. I'm using the code from the USB TI developer library and I've got it working on their developer board, but not on my own board. I don't know so much about USB, so I'm not even sure where to look. I've tried to learn from many of the other boards here + the TI USB board. 

 

I've attached the part of the board that's relevant for the schematic and board. One thing I know I'm doing wrong is the vias, to cross the + and - lines. This is a 64-pin F5528, so I can't do the smart routing that Rob and others have done. I also don't have an ESD protection chip on there. 

 

Basically what happens is that I get an error message in Windows saying that my USB device is unknown/not recognized. 

 

Anybody knows how to debug something like this? I guess it could be a hardware problem or a problem with my soldering etc. Might be firmware also, but the code runs on the TI developer board with the same chip... :-(

 

post-4760-0-38083900-1371660833_thumb.png

 

post-4760-0-27091900-1371660844_thumb.png

 

 

Link to post
Share on other sites

what is the purpose of the 1 Meg the resistor going to ground... .

 

if its a low volume board, you could move the connector to the back of the board, and take both signals through with vias so they wouldn't have to cross

 

also the soldering on those QFN is notorious for bad connections, try more flux, and reflow?

 

if windows is throwing the error message then atleast it is seeing the pullup resistor,  do you have an oscilloscope to look at the waveforms with?

Link to post
Share on other sites

I'm building a board using the 64-pin F5528 and I'm hoping to use the USB, but I'm not able to get it to connect properly. I'm using the code from the USB TI developer library and I've got it working on their developer board, but not on my own board. I don't know so much about USB, so I'm not even sure where to look. I've tried to learn from many of the other boards here + the TI USB board. 

 

I've attached the part of the board that's relevant for the schematic and board. One thing I know I'm doing wrong is the vias, to cross the + and - lines. This is a 64-pin F5528, so I can't do the smart routing that Rob and others have done. I also don't have an ESD protection chip on there. 

 

Basically what happens is that I get an error message in Windows saying that my USB device is unknown/not recognized. 

 

Anybody knows how to debug something like this? I guess it could be a hardware problem or a problem with my soldering etc. Might be firmware also, but the code runs on the TI developer board with the same chip... :-(

 

Your problem for sure is not in crossed +/- lines, or/and ESD protection chip, because my p2p DIY board (http://forum.43oh.com/topic/2775-msp430-usb-benchmark) have much bigger problems (regarding layout), and works OK.

 

Are you using internal LDO? Post here complete schematic with power lines connection.

 

I hope that you have RESET/BSL buttons on board. Try to flash it with USB BSL generic code examples (P1.0 blink) prepared for MSP430F5529, to see if it will be enumerated right with BSL entry.

 

post-26480-0-89784500-1371665259_thumb.gif

 

what is the purpose of the 1 Meg the resistor going to ground... .

 

1 Meg resistor is used to not have (some kind of) floating state on DP/PUR pin. It is present on TI USB schematic but it is not used (NA marked on schematics). I don't use it.

Link to post
Share on other sites

OK, will try BSL. I don't have the button, but I have a via for the PUR. Connect this to VCC through a 100Ohm resistor? Will read the docs. 

 

I'm powering it off a Launchpad, at 3.6V. Will that cause problems?

 

I'm not using the internal regulator, but I believe it's on. The 1.8 V is on at least (but is not used either, just connected through a decoupling cap to ground.)

 

Almost complete schematic attached.

 

post-4760-0-07481600-1371668261_thumb.png

Link to post
Share on other sites

It doesn't seem to enumerate when I do the BSL thing either, if I'm doing it right. I've tried invoking BSL from software by calling ((void (*)())0x1000)(); and have also tried holding the PUR up while I reset the MCU. But that may not work properly when I power it externally... 

Link to post
Share on other sites

I hope that you are using 24 MHz XT2, same like on TI developer board.

Don't know if you already tried, some simple example (not related to USB) like toggling P1.0. If you didn't, try it, just to be sure that it's working at all. And I mean stand alone, without Launchpad (power supply or whatever) connection. So flash target board with P1.0 toggle firmware. Disconnect it from Launchpad, and connect it to external supply. Turn power on, and check. If you don't have firmware on hand here is my testing example.

 

sbw_test_32.rar

 

If this is working OK, try something related to XT2, for example "MSP430F55xx_UCS_08.c" from "slac300 MSP430F552x C Examples". On the same way like with toggle example, stand alone, with disconnect launchpad after programming.

If there is no problem with XT2, you can start with USB testing. Made test with "buss powered" like configuration. Flash target device with firmware, and disconnect Launchpad. You are not using internal LDO, so there is no connection to VUSB pin? If there is no connection to VUSB pin, and all DVCC/AVCC chip pins connected together, just connect your external 3.3V supply to DVCC/AVCC. Let's make external supply to be synchronized on power-up. Connect external LDO input lines to (5V/GND) VBUS/VSSU lines on target chip. Now, device will act like buss-powered even external LDO is used. You can test it with my frequency meter (http://forum.43oh.com/topic/3317-msp430f550x-based-frequency-meter). It should work, at least enumeration.

If everything is working, you can try BSL. Just press RESET and BSL together. First release RESET, and after this BSL. There is no need to connect/disconnect USB cable. BSL switch must be between 3.3V line (AVCC/DVCC) and PUR pin over 100R. There must be 1k4 between PUR and DP pin.

Link to post
Share on other sites

Thank you. I'll go through those steps.

 

Will also assemble a new board to see if it might be a soldering problem. I think maybe I destroyed the last one while testing yesterday. Will also try driving the USB lines as digital output lines to check that there's contact with the MCU's internal USB lines, without soldering issue. 

Link to post
Share on other sites

I seem to be getting 4MHz as MCLK in the example, so I guess that the crystal is working ok. It might not be exactly 4MHz, according to my scope... 4.01MHz. Not sure if my scope is that accurate either.  (I use a 4MHz crystal). 

 

Do you know how to drive the PU.0 and PU.1 as digital outputs, just to see if they work?

 

I've tried doing:

 

  USBPWRCTL   =     VUSBEN + SLDOAON;
  USBPHYCTL |= PUOPE | PUOUT1 | PUOUT0;
 
But doesn't seem to work. 
 
Just testing with my new board, and it seems to behave the same way :-( Haven't gotten to the BSL testing yet. 
 
Tried a different cable now. A shorter one... and it seems to get a bit further in identifying the device!!

 

Lars

Link to post
Share on other sites

AFAIK on TI dev boards 24 MHz XT2 is used, and you are using 4 MHz, and this is not the same thing, because in this case USB PLL configuration is wrong. You must replace in your source code USBPLL_SETCLK_24_0 with USBPLL_SETCLK_4_0 if you want to run it on your board with 4 MHz XT2. Also, all TI examples are prepared by default to MSP430F5529 target with 24 MHz XT2, so they will not work with your board.

Here is attached my freq meter firmware for 4 MHz target board, so you can try it. Do it as I suggested in last post, by using target board USB supply (+5V / GND) as input of your external regulator.

 

fm.rar

Link to post
Share on other sites

Thanks. I tried last night with your trick with another power supply at 3.3V instead of launchpad as you suggested + a shorter cable. Then it enumerates and works! I'll try your fm.rar also this weekend. Thank you very much. I had the 4MHz setting sorted already. 

 

What's the deal with the Launchpad-regulator not working? Too much noise, or too high voltage? I have an on-board 3.0V regulator I'm planning to use, but haven't soldered it on yet. The 3.3V on the USB +/- is sourced by the internal 3.3V regulator, from the VBUS, right? When it's turned on. 

 

I guess to get it working with a longer cable, I have to review my PCB layout and soldering. Do you think this would be the 24ohm resistor and 10pF capacitors on the DM/DP lines? Are their values very important, matching the USB line or something? There seems to be different values for these components on the internet. 22Ohm, 24 Ohm, 27 ohm and different capacitor ranges also. 

 

Thank you so much, Jazz!!!

Link to post
Share on other sites

What's the deal with the Launchpad-regulator not working? Too much noise, or too high voltage? I have an on-board 3.0V regulator I'm planning to use, but haven't soldered it on yet. The 3.3V on the USB +/- is sourced by the internal 3.3V regulator, from the VBUS, right? When it's turned on. 

 

I am using MSP430F550x as bus-powered device, with internal LDO. Didn't measure max possible current of internal LDO, but till now don't have problems with it. My plan is to switch to external LDO later, if this will be needed (by current consumption). Didn't made serious testing, but MSP430F5xx is sensitive on start-up power sequence, if USB is used together with external LDO. Best way to incorporate external LDO is by using USB VBUS +5V line as LDO input. In this case start-up sequence (internal/external LDO) will be OK. Good example for this is alternative LDO from MSP-EXP430F5529.

post-26480-0-63168100-1371824184_thumb.gif

 

Yes, USB module is powered by internal LDO.

 

post-26480-0-98118100-1371824978_thumb.gif

 

I guess to get it working with a longer cable, I have to review my PCB layout and soldering. Do you think this would be the 24ohm resistor and 10pF capacitors on the DM/DP lines? Are their values very important, matching the USB line or something? There seems to be different values for these components on the internet. 22Ohm, 24 Ohm, 27 ohm and different capacitor ranges also.

 

USB cable length can't be a problem. Just follow MSP-EXP430F5529 schematic, and everything will work fine. Didn't study USB electrical spec regarding RC ratio.

 

post-26480-0-41251200-1371825094_thumb.gif

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...