Skip to main content
Visitor II
October 23, 2024
Question

"usb device not recognized" STM32G0B1ME

  • October 23, 2024
  • 2 replies
  • 1179 views

 

Hello everyone,
I’m trying to activate the USB module present on my custom board equipped with the STM32G0B1ME microcontroller. Currently, I would like to see data transfer from a PC serial terminal to the microcontroller. Unfortunately, this is not happening at the moment, as upon powering on the device I receive "USB device not recognized."

The hardware is as follows (USB Type-C):

seba21_0-1729691001440.png

seba21_1-1729691005800.png

Unfortunately, I did not design it, and I currently cannot modify it.

The firmware configuration is as follows:

seba21_2-1729691027572.png

seba21_3-1729691036793.png

seba21_4-1729691042048.png

 

with USB, UCPD1 and UCPD2 global interrupts enabled.

In the main, I simply have:

 

 

 

#include "usbd_cdc_if.h"
...
MX_USB_Device_Init();
...
uint8_t *data = "Hello World from USB CDC\n";
...
while (1) {
...
CDC_Transmit_FS(data, strlen(data));
HAL_Delay(1000);
}

 

 

But... "USB device not recognized".

I have verified that the drivers are correct because if I follow the same procedure with the STM32G0B1RE Nucleo board, it works...

Thanks for help!

    This topic has been closed for replies.

    2 replies

    Graduate
    October 23, 2024

    Check the clock - hardware and software config. Is the clock hardware the same as in Nucleo? What clock is used for USB?

    seba21Author
    Visitor II
    October 23, 2024

    You're right. I didn't notice that, while the Nucleo board uses HSE48, the custom board uses HSI48 RC. I hadn't considered this before. I don't think HSI is precise enough to handle USB...am i wrong?

    Graduate
    October 23, 2024

    HSI48 is the right oscillator, provided you turn on synchronization to USB SOF in CRS.

    Technical Moderator
    November 11, 2024

    Hi @seba21 

    Maybe, because on package STM32G0B1ME, you need to check VDDIO2 pin. It must not be applied without valid VDD.