2014-04-28 03:47 AM
Hello to everybody,
using the USB-Device example for the STM324xG_EVAL (CDC-Standalone) I tried to get USB up and running on the STM32F4-Discovery-Board. The example is taken from the latest version of the STM32Cube firmware package. My problem is, that I had no success getting USB to work correctly. All I get is a error message (Windows) saying ''Enumeration of device failed''. Up to now, I already verified the system clock to be correct by toggling a GPIO pin in the SysTick ISR. The pin state toggles every 1 ms, which matches the required SysTick interval. Also, I checked the preprocessor definitions, currently the following are defined:I have attached my main.c and main.h file, and also a screenshot of the CrossStudio project explorer.
My goal is to have a communication channel for �C <-> PC and vice versa - is the CDC-VCP example a good starting point? What could be the cause of my problem? I already investigated this for many hours, but without any success. If you need more information, please don't hesitate to ask. Thanks in advance! Alexander W. #usb #stm32 #stm32f4 #discovery2014-04-29 02:51 AM
Hi
I do not have time to look at your code (I too busy at work at the moment). ''My goal is to have a communication channel for µC <-> PC and vice versa - is the CDC-VCP example a good starting point?'' Yes. ''What could be the cause of my problem?'' Check the clocking of the USB peripheral. It MUST be 48MHz to work correctly. The fact that windows host PC see something suggests the USB core is working. Unable to enumerate - may be that the USB bit freq is wrong suggesting that the USB peripheral is being clocked at wrong freq. (This was the problem when I did the USB work - however, it might be something else)2014-04-30 05:12 AM
Hello,
I have done further research on the problem, but with no success. Because of the fact that the same error occured just after unboxing (with stock flash contents), when trying to use the HID-Accelerometer example, I've buyed another STM32F4-Discovery board. The result was exactly the same, the device manager stated that a failure occured when trying to get a device description - even with the preinstalled sample. After that, I used another PC, but the problem still occured. I also tried to flash various precompiled .ELF-Files directly, all taken out of sample applications regarding USB for the STM32F4-DISCO found on the internet. None of these applications worked. Now, it seems to me that something on the STM32F4-Discovery Board is screwed up. Is anybody from ST present in this forum? I am really disappointed about the development experience with the board and have already spent several days with troubleshooting. Kind regards Alexander2014-04-30 07:17 AM
Hi
There are 3 different STM32F4 eval boards : http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419 http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098 http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259090 ''I also tried to flash various precompiled .ELF-Files directly, all taken out of sample applications regarding USB for the STM32F4-DISCO found on the internet. '' Only the 'Firmware packages' for each specific board will work, look for them under ''Related Tools and Software'' Download the one for your specific board ! The probability of have 2 bad boards is small (but not impossible)2014-04-30 07:45 AM
Is anybody from ST present in this forum?
Not really, this is a user forum, and the Cube stuff is on the other STM32 forum page. I'm not interested in providing support for it. I've previously posted working STM32F4-DISCO VCP examples using the earlier FW libraries, and building under GNU/GCC2014-04-30 08:50 AM
The flashed ELF-files were especially for the STM32F407VG-Controller, as this is the controller on my Discovery board. They were download from different websites and were not part of the firmware package.
In addition, I also compiled and flashed a CDC-VCP example, which uses the old Firmware Lib, without success.2014-05-01 01:42 AM
''The flashed ELF-files were especially for the STM32F407VG-Controller, as this is the controller on my Discovery board. They were download from different websites and were not part of the firmware package.''
You cannot just load an ELF designed for 1 board onto your board and expect it to work! The Pin IO is probably different for a start, let alone the clocking scheme! ''I tried to get USB up and running on the STM32F4-Discovery-Board. The example is taken from the latest version of the STM32Cube firmware package.'' Since you have a STM32F4 Discovery board - try to get that running as a USB demo first. I have not tried the STM32Cube myself. I have successfully used the USB OTG library from ST http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257882