cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 USB problem

Anton.Mina
Associate II
Posted on July 27, 2016 at 18:51

Dear ST,

I have a problem letting my STM32F746 (144 pin) USB CDC (device) work properly, every time I connect it to the PC I got this message:

 

(The device cannot start ... code10)

This is the steps I did to get this problem:

1)

     

I have many successful projects based of STM32F0xx with USB CDC, I did all of these project using the Cube, I didn’t change any of the cube settings and it was working fine, from the hardware point of view I was connecting only D+, D- and GND since the projects requires power more than the capabilities of the USB.

2)

     

This is my first project using the STM32F7xx family, I did exactly the same as I do in F0 family from both point of view: hardware and Cube

à

nothing work at all

3)

     

I tried to find out a solution, I discovered that the default value of the VBUS sense was “Enable�?, but I didn’t connect it in hardware, so after building the project I went to the configuration of the USB and changed the setting from “Enable�? to “Disable�? and connected again to the computer

à

it was sensed but having the message above of (The device cannot start ... code10).

4)

     

I thought it be my computer issue and nothing to do with the microcontroller so I tried to uninstall the driver (V1.4.0) and reinstall it again

à

now all my boards (old F0 that was working and new F7) are not working (Windows cannot verify the digital signature Code 52).

5)

     

I moved to a new PC, installed same driver copy I have (V1.4.0) and tested

à

the old F0 boards are working fine, the new F7 board is not working and giving me the same error above (code 10)

Could anyone tell me how to fix the issue with the new board of F7 and how to properly configure the Cube? Also if anyone can tell me how to fix my computer so it can read the old working boards of F0?

Thank you all.

Best regards,

Mina.

3 REPLIES 3
Anton.Mina
Associate II
Posted on July 28, 2016 at 19:05

Update:

After searching the internet, I found out how to fix my computer and now it can detect my old working boards with the STM32F072 microcontroller.

But still the original problem with the new board with STM32F746 microcontroller, when I connect it to the PC I always got a new com port (COM13 in my case) but not working with this message: “This device cannot start. (Code 10)�

As I used the cube to generate the code and driver for the USB with the CDC class so I believe that the problem is wrong configuration from me or a bug in the cube, but since I already use the cube to generate the USB code for other families (F0) and it is working well so for me it’s 99% my mistake in configuring the USB settings; the problem is I don’t know how to properly configure it.

Any support is highly appreciated,

Thank you,

Mina Anton

eugenpkh
Associate
Posted on July 28, 2016 at 21:38

Try to increase a stack and heap

Anton.Mina
Associate II
Posted on July 29, 2016 at 18:08

Dear pkh.eugen,

First I'd like to thank you very much, the problem is completely solved, I doubled both of the stack and heap from:

Stack_Size        EQU     0x400

Heap_Size         EQU     0x200

To:

Stack_Size        EQU     0x800

Heap_Size         EQU     0x400

Then the problem is completely solved.

But please I need to know why I had this problem from the first place, I never changed the stack or heap before in any of the STM32F0xx projects with USB and it was working fine, is that a mistake during configuring the Cube? or bug in the Cube? or other reasons?

Thank you very much.

Mina Anton