cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411 Virtual Com Error (Code 10)

nmadinger
Associate II
Posted on May 06, 2015 at 15:05

Hello,

I am using the Cube to configure the micro's USB OTG as a virtual com device.  However, when I plug this USB into my Windows 7 PC, the driver on the PC reports that the device cannot be started (code 10).  I have tried searching for a new driver, but cannot find one.  Has anyone else encountered this error?

By the way, I have a similar error when trying to use the DFU device too.

#code-10 #stm32f411-virtual-com
7 REPLIES 7
armindavatgaran
Associate III
Posted on May 06, 2015 at 16:19

Hello

I had the same problem with stm32f407vg, the problem was in heap and stack memory sizes defined in startup_stm32f407xx.s file.

If you have exported this project from other device families, check the mentioned parameters.

Posted on May 06, 2015 at 17:41

Perhaps assume it's not software, and review the state of the input clock, and the wiring to the USB connector.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nmadinger
Associate II
Posted on May 06, 2015 at 19:09

What should the ID pin be tied to?

I am using this as a device only and there is a charger based off of the USB voltage.

Thank you,

Noah

nmadinger
Associate II
Posted on May 06, 2015 at 21:42

Ok, and is this board something of your creation, or one we might be familiar with?

Do you have the right 32/64-bit driver for whatever flavour of Windows you're using?

I don't recall if the F411 has USB support in the Boot ROM, but if you strap BOOT0 High when you power up the board, does Windows recognize it being in DFU mode?

Do other, non-Cube libraries work if ported to your board?

Does an STM32F4-DISCO board work? It has the ID pin pulled to ground via a 100K resistor.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nmadinger
Associate II
Posted on May 06, 2015 at 22:43

This is my custom board; a consumer electronics project based around the STM32F411.

The ID pin is now tied to GND via 100K resistor.

Tying the Boot0 pin high, made the device enumerate as a DFU device.  Does this mean that Boot0 must be high to use the DFU based bootloader?

With booth Boot0 and Boot1 at GND, I still get the code 10 error when trying to enumerate the virtual com port.

I have the Windows 7 64-bit driver installed version 1.3.1.0 date 4/25/2010 from ST.  Still not working.  Any other thoughts, or questions?

nmadinger
Associate II
Posted on May 07, 2015 at 17:07

Your advice was great!  In the startup_stm32411xe.s I changed the following lines and it worked!  The '';'' indicates a comment.

Stack_Size      EQU     0x00000500;0x00000400

                AREA    STACK, NOINIT, READWRITE, ALIGN=3

Stack_Mem       SPACE   Stack_Size

__initial_sp

; <h> Heap Configuration

;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>

; </h>

Heap_Size       EQU     0x00000300;0x00000200