cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get STM32G0B1VE USB device work.

Jackle
Associate III

I use STM32CubeIDE1.6.1 to generate USB device (CDC VCP mode) code for STM32G0B1VE. The PC could not recognize the USB. I tried internal HSI48 clock and PLLQ for USB (clock frequency verified by MCO), I pulled up DP through 1.5k resistor by a GPIO after about 2 seconds once starting the code. I'm using Windows 10. Please help!

@Imen DAHMEN​ 

1 ACCEPTED SOLUTION

Accepted Solutions

I noticed you're using STM32Cube FW_G0 V1.5.0 which is higher version than mine.

So, I downloaded the latest STM32CubeIDE1.7.0. Guess what? It's working now.

I'm not sure what it was. I assume the new version just fixed something.

Thanks go to @MichaelSweden​ @Imen DAHMEN​ @Nawres GHARBI​ 

View solution in original post

38 REPLIES 38
Imen.D
ST Employee

Hello @Jackle​ ,

First of all, check the USB connection, and try switching to another USB port.

Then, try increase the heap size of the application. You can follow this article USB device not recognized, it may help you on this issue.

 Please keep me informed about your progress on this.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

I did increase heap to 0x2000 and stack to 0x800 and I tried different port. No luck. Do we have an executable code that I can download to verify the hardware or connection? Did we test the STM32CubeIDE on STM32G0B/C?

Imen.D
ST Employee

I recommend you to upgrade the ST-Link firmware version using STM32 ST-LINK Utility: go to ST-LINK>firmware update,

 Then disconnect and connect your board.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

0693W00000BcT5PQAV.pngAs recommended, the upgrade of ST-Link firmware didn't fix the issue. Still can't recognize the USB.

Imen.D
ST Employee

Did you upgraded the USB driver in the device manager ?

0693W00000BcTA0QAN.pngImen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Jackle
Associate III

0693W00000BcTMaQAN.pngI did. But it can't recognize my VCP USB. My debugger works fine. It's just the USB I tried to get as VCP doesn't work.

Imen.D
ST Employee

Hi @Jackle​ ,

It's strange ! Maybe you have an issue with your PC.

Can you please check with other board ?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

No, changing PC or board doesn't make any difference.

I can see signals on the DP and DM lines when I just plug in USB.

I suspect it's the PC driver problem or USB device Descriptor problem.

Can you please verify the default setting as shown in the screenshot here?

Please confirm that STM32G0B1VE has been tested with STM32CubeIDE for USB VCP (CDC) device only FS mode so that we will have confidence before digging further. Thanks.

0693W00000BcaYTQAZ.png@Imen DAHMEN​ 

Imen.D
ST Employee

Hi @Jackle​ ,

I haven't tested this as I'm working from home and I don't have access to that specific board, but that should work.

Have you checked the D+ and D- line? Maybe DP/DM are swapped !

Have you tried to run one of the working STM32Cube examples ? If no, please try this in order to deduce if the problem here seems related to the hardware or software environment or was caused by ST-Link.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen