cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VG programmed as a custom USB device can't be recognized by Windows 10

AGunn.1
Associate

Hey all,

I'm new to MCU programming. Right now I'm looking into starting interaction with STM32F407VG via a USB port. My simple understanding is I've got to create a piece of code allowing the MCU to pretend to be a device with a specific VID (1234) and PID (0001).

I use MicroC PRO for ARM version 6.2.0, that comes along with a tool called "HID Terminal". Second tab of it is called "Descriptor" and allows to generate some code("USBdsc_STM32F407VG.c"), including but not limited to: "Device Descriptor", "Configuration Descriptor", "Report descriptor" and the VID and PID mentioned above. If I include "USBdsc_STM32F407VG.c" in the beginning of the main source code and leave "main()" function as just a piece of looping code doing nothing and then successfully program the MCU... Upon plugging the MCU into a Windows 10 PC I expect to see an unknown device under "Device manager" telling me the VID to be 1234 and PID=0001. Instead I get "USB Device Descriptor Failure" error for few seconds leading to error code 45 (Device not connected -> it disappears from the Device manager).

I tried an example for STM32F407VG located here: "...\mikroC PRO for ARM\Examples\ST\Other\USB HID Bootloader\Projects\STM32F407VG\". All built and programmed successfully, but I get the same "USB Device Descriptor Failure".

Questions:

1) At which stage a driver has to be installed? Am I right, that first I need to see a device with a valid VID and PID uder Windows device manager?

2) USB 2.0 is 5V and the MCU is 3V. Does it matter? Does it make any difference connecting to USB 2.0 or 3.0 port?

3) Can this be a purely hardware issue with the MCU's microUSB port?

4) Anything else I'm missing?

Your help is much appreciated. Thanks in advance.

1 REPLY 1
AG.2
Associate II

Hello Friend, I am also new to Microcontroller world and I bought a STM32F407VET6 board, I don't know what to do and where to begin? if you have any ideas, I appreciate if you share with me