cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get HS MSC device working with SMSC3343. FS works fine.

dragan
Associate II
Posted on January 19, 2012 at 22:55

I don't see any obvious reasons for the problem I have and would appreciate greatly if an expert from ST micro or a fellow developer can help or provide some pointers.

I have SMSC USB3343 ULPI PHY connectede to STM32F207IGT6 and in device mode. 3343 is to work in clock output mode. I use STM32_F105-07_F2xx_USB-Host-Device_Lib_V2.0.0 USB library. I use MSC test program from the package. When I run it on the STM3220G-EVAL board it works as HS device. However, when I use the same test program on my board it always works as FS device. I'm really puzzled. I reviewed the h/w and althought there are differences in the PHY device used nothing seems as an obvious reason. I can provide schematics for a review if needed.

I would also appreciate if somebody could help me and explain how can I dump registers from SMSC USB3343 using functions from ST USB library. It's not clear to me how this is done mainly because the code is not commented in great detail how it works.

Thanks.

#usb #cortex-m3 #smsc3343
12 REPLIES 12
flyer31
Senior
Posted on January 20, 2012 at 08:04

Perhaps you could publish the circuit schematics around the 3343 chip? But I assume, you use exactly the schematics given in Figure 8.2 of the 3343 datasheet? (but I also do not have any self-made and running USB-HS board yet, just dreaming of it ...).

I think the most important switch from FS to HS are the termination resistors and the setting of the bit ''XcvrSelect'', see 5.2.2 of the datasheet. If you look at the registers Function control in 7.1.1.5 and OTG Control in 7.1.1.7, FS seems to be the default state of this chip.

Just as I see it from a short survey, these register settings seem to be quite similar in the ULPI chips (I compared USB3343 with ISP1507(Table 7), and STULPI01B (Table 12)). Also the function control and OTG register seem to have the same bit layout and read/write address for all these 3 chips. ... looks really complicated ...

I am thinking to add the STULPI01B chip to my demo board layout, so that I have an alternative for testing ... . ISP1507 unfortunately seems to be discontinued - at least by NXP. It should be available by STEricsson, but I do not find any distributor, where you can get these chips (additionally they seem to come in 4 different versions...).

dragan
Associate II
Posted on January 20, 2012 at 17:30

I'm publishing schematics for review.

Thanks.

________________

Attachments :

smsc3343_communication.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Kd&d=%2Fa%2F0X0000000blP%2FoP_H0vEzmyjdx5Ut4pdppFLxmgy2PCGvaFEMBBl83lw&asPdf=false
flyer31
Senior
Posted on January 22, 2012 at 13:13

My own HS-USB layout is not yet ready (I am just preparing a layout with USB3343 / STULPI01B and TUSB1220 transceiver, to compare them). Just I saw, that your layout has some difference to the recommended device application layout in the USB3343 datasheet - mainly I saw that the 4.7uF capacitor is missing on the VBus line - but I am not sure whether this is important.

Yesterday I was very happy that I succeeded with the HS-CDC version of the ST USB 2.0 lib to adapt it to the Keil MCBSTM32F400 board (which has a STULPI01B chip for the Hi-Speed USB). The board now is announced at the PC with running in HS mode, and hyperterminal works, but I did not do any data transfer velocity tests yet - I will keep you updated.

dragan
Associate II
Posted on January 23, 2012 at 17:17

That is a great news. According to Linux sources, some uc have ULPI viewport registers to directly read and write ULPI register settings. I couldn't find these in ST HS controller. I tried Keil USB library over the weekend and it's still FS. This time I get message ''your device can perform faster''. I don't get it with ST library. I will try that capacitor you noticed. Keep tuned to hear about your progress.

dragan
Associate II
Posted on January 23, 2012 at 22:15

Tried 4.7uF cap at VBUS and it doesn't help.

dragan
Associate II
Posted on January 27, 2012 at 19:42

I got confirmation from STmicro that on STM32F2xx it's not possible to change registers in ULPI PHY directly i.e. there are no ULPI viewport registers like in some other USB controller chips.I captured register USB_OTH_HS register r/wand compared my board with ST EVAL and clearly ST EVAL board goes to HS while my board stays in FS. Register dump doesn't show anything unusual or errors which would point to a problem. I also did the same thing on USB bus with protocol analyzer. Chirp sequence on ST EVAL board completes OK and device goes to HS mode while on my board it timeouts and board stays in FS. My USB analyzer (Ellisys explorer 200) doesn't provide more details on why chirp timeout. I attached USB capture for reference.

________________

Attachments :

my_board.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtTn&d=%2Fa%2F0X0000000aQY%2Fd8lQYE1HoydsatNGjLDduwpwicS1h5fqpeiicqTxgA8&asPdf=false

st_eval_board.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtTs&d=%2Fa%2F0X0000000aQZ%2FYLoeUsEUxcZVD4ooRjli4NBDKdDkyN4M1DMWQ5hK9U8&asPdf=false
flyer31
Senior
Posted on January 27, 2012 at 21:22

Not yet ready with the PCB comparison test - PCB will still need some weeks I am frightened. But the Keil board with this ULPI01B from ST runs very nice - I get >50MB/sec transfer rate for USB Hi-Speed (with DMA), which is about the maximum you can expect. (Device mode, WinUSB bulk transfer). Perhaps it is a practicable way for you to buy the Keil board, so that you have some reference design to check?

dragan
Associate II
Posted on January 31, 2012 at 17:25

We bought the Keil board and we also did an add-on small circuit board adaptation to replace SMSC with STULPI001 PHY. It should be in-house in about a week from now. I'll let you know how it worked but given that it worked for you on the Keil I'm hopeful.

dragan
Associate II
Posted on February 14, 2012 at 18:49

I'll be testing the STULPI001 with STM32F207 in 2 days and will update the post how it went.