2011-10-25 01:23 PM
Hello,
First I4m working on my own board, a product almost final on which I added USB. MCU is STM32F205RE and ''of course'' I used the HS USB port (using embedded PHY). Now I'm trying to get it working and it is VERY twitchy ... first if I plug or unplug the USB cable while powered up => hard fault (did not check yet exactly why). Then even if I start with USB cable, 90% of the time windows says the USB peripheral is unknown/did not work, and 10% of the time the driver installation starts with the right descriptor strings, fails and the device appear in the device manager with a yellow icon and error code 10 (device can't start). My MicroB USB connector is directly connected to PB13 (VBUS), PB14 (DM) and PB15 (DP). VBUS is only for sensing and never for powering the board. Any idea ? Thomas.2011-10-26 02:10 AM
According to this document :
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00237391.pdf
Page 150/163, my physical implementation seems ok (direct connection to DM, DP and VBUS, but I don't use an LDO because the board is powered by it's own supply).Then it seems it is software related :(Thomas.2011-10-26 03:45 AM
Back again,
Seems I found an issue ... I'm using a ceramic resonator from MuRata to provide clock.But I was using ''standard'' resonator, and from what I read, only their ''tight tolerance'' version is compatible with USB2.0 FS.I'm trying to get samples asap ...Regards,Thomas.2011-10-26 04:38 AM
Me again (not just for flood, but it may help someone in the same situation).
About ceramic resonators and USB :- USB2.0 FS requires a +-2500ppm (+-0.25%)clock accuracy.- Standard accuracy (when adding initial calibration, temp deviation and aging drift) for MuRata CSTCE (called G55) is +-0.8%, which is not compliant- The tight tolerance version (G15) is exactly within the +-0.25% required by USB2.0- As they sell the same package and same marking with different tolerances, I assume all units come from the same factory line, and after production they test it and classify its tolerance depending on the test result. This mean even with chance, the G55 will probably never be in the 0.25% range ... because then it would have been sold as a G15.I found the G15 version at mouser : http://lu.mouser.com/ProductDetail/Murata/CSTCE8M00G15C99-R0/?qs=sGAEpiMZZMsBj6bBr9Q9aSrrnQdmJfHxte3VrRPRha4%3dThe G15 version costs about twice as much as the G55 version (not that bad).I ordered a few units at mouser to confirm and will tell the result here.Thomas.2011-10-26 07:07 AM
Final word ...
Got MuRata on phone ... that will probably work most of the time with the G15, but for production it is not the recommended reference.For USB2.0 FS they recommand the ref CSTCW24M0X11047 which is a 24MHz resonator (no problem on the STM32).They can even take a board and craft a customer specific reference that is paired with the MCU to get the exact specifications you want free of charge.Thomas.2011-10-29 04:49 AM
Ok I received the new resonators from Mouser ....
First one, very weird, run firmware, plugged USB, recognized as ST stuff, driver install failed, cannot start. Reboot board, plug again, nothing ... did multiple times, still nothing. Flashed my application firmware .... WTD the led blick a at least half slower than it should be !!!!! Mounted a new resonator ... exact same behavior than with the old one (with standard tolerancies). 95% of the time it doesn't show up or shows as unknown device (that failed, code 43), 5% of the time, recognizes as ST VCP, starts driver installation and fail, then says device cannot start (code 10). I'm really FED UP with ST stuff ... they document a non existing USB port (FS is not there on the F205), the MicroXplorer tool offers ''analog'' on each pin of the device (even where there is no ADC, yes ... ho and you can of course configure your USB FS port in Xplorer too), the USB stack is not working, etc. On TASKING, try to import the HID demo project, it compiles, switch to EMBEDDED_PHY and it doesn't even compile !!!!! Do you guys test your software before releasing it ????? I lost so much time because of ST and their tech support ... they have great microcontrolers, but support is almost non existing. Documentation on the USB stack IS totally non existant, you just have to read the code and guess ... [EDIT] Ho and I forgot .... the forums that are down approx half of the time, buggy everywhere, slow, etc ... I2C (even master !) is just a joke, etc2011-10-29 05:45 AM
Downloaded Atollic Lite to test ....
Can't even compile the VCP demo using the provided instructions. Can someone compile the VCP demo using HS EMBEDDED PHY on STM32F205 and send me the HEX file ? Don't know what is THE supported tool by ST, but it seems I don't have it ...2011-10-29 06:11 AM
Back to TASKING ....
I tried the different device proejcts provided and ..... surprise, MSC (Mass Storage) is enumerating correctly, and install drivers as expected. Of course I didn't test more than that because my board has no SD card connected ... but that proves that the hardware is ok, and the software is crap ...2011-10-29 07:36 AM
I stated debugging the stack (hell yes, always wanted to know the very inner workings of the USB stack ...).
It seems the configuration phase goes ok, but then the board keeps triggering DCD_HandleSof_ISR. I mean if I put a breakpoint at the very beginning of this interrupt (called by OTF_HS_IRQHandler), then another interrupt is already pending. I have no trigger on the EP1 dedicated IRQ handlers (I had some in the MSC firmware). Could somebody (ST Tech support, by chance ...) look at it please, it really is annying.Thomas.
</b>
2011-11-02 08:24 AM
*bump*
Reviewing all documentation I can find, I often see 22 ohm resistors between DP/DM on the MCU and DP/DM on the USB connector. Are they mandatory?I added them on my design for next revision. I also added the 1.5kohm pull up resistor on DP, but it seems STM32F2 OTG HS doesn't need it because it has them internally and switch them on/off depending on the current configuration (host, device, etc).Nothing on software side ?Did someone got the VCP demo to work on something with OTG HS embedded PHY ?I asked HCC to provide me a demo firmware to see if it can work, but I'd like to make the ST stack working (I don't have an RTOS and don't want to use one ...).Why is the SD Card demo working (at least enumerates well and install drivers), and VCP cannot start (code 10) ?Thomas.