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​ 

38 REPLIES 38

It has been a while. Any news on this from your CubeMX team?

Jackle

Hi @Jackle​ ,

We apologize for the delay it sometimes takes to respond.

In this period of the year, many ST employees are on vacation, and it's a busier time for others :pensive_face:.

I re-escalated your issue to CubeMx team for review (Internal ticket 111064: this is not accessible or usable by customers).

Imen

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

Hi @Jackle​ could you please attach the ioc

Here you go.

This is related to your interrupt prio level, at 0 it is in conflict with the systick.

Please put it at 0x3.

0693W00000D0m7gQAB.pngyou mean like this? Still not working.

Any progress?@Imen DAHMEN​ @Nawres GHARBI​ 

I also got problem with USB on STM32G0B1 device. Please see my newly post in the "Virtual Com Port Not Recognize STM32G0B1KCT6"

https://community.st.com/s/question/0D53W00000wzdQLSAY/virtual-com-port-not-recognize-stm32g0b1kct6

Solution for me was to enable interrupt in the configuration page shown above. However I would like to know:

Do I need to change the preemption priority level? If so please explain why.

i.e. HAL_NVIC_SetPriority(USB_UCPD1_2_IRQn, 0 or 3, 0);

PS. I consider it a bug in CubeMX, that the interrupt is not enabled automatically (like it is for a F401).

Best regards

Michael

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​