2013-08-28 04:01 AM
Hi
Help, I have been trying to get the STM32_USB-Host-Device_Lib_V2.1.0 working as a Virtual Com Port/CDC on a STM32F407 in Atollic TrueStudio. No RTOS - bare infinite loop in main. The code compiles and run OK. USB driver code initializes OK. However, when I connect the USB up to a Windows7(64bit) PC, the device fails to enumerate properly. I used MS logman utility to trace what the USB negotiating is happeneing. The device is detect OK by the Hub. Host is told about device. Speed is detected (Full Speed ie USB1) End point connection is established. Host requests Descriptor device replies STALL Hub Closes Endpoint connection Process repeats 3 times. I found the endpoint code in usb_dcd_int.c I found the code which opens the end point connections. I found the code which is suppose to send the descriptor. What I do no know is why the code to send the descriptor is not being executed. Does anyone know why not? I also do not know why the code is replying with 'stall' Maybe his is part of the problem.2013-08-28 08:12 AM
Hi
I have sorted my problem out now. I worked out that I was not getting USB interrupts for sending or receiving control packets. Could not figure out why! A colleague of mine told me to look carefully at the chip configuration. Eventually, I worked out that the internal clock config was not right. I was using the configuration for the Discovery board.2014-01-02 10:57 AM
Did you fixed this problem ? It looks that I have similar one.
2014-01-03 12:42 AM
Hi
Yes, I did. It was due to incorrect clock freq selection. As I said to you in the other thread - the USB peripheral MUST be clocked correctly (needs 48MHz) or it will not work!