cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-U083RC USB Device problem

marco_virg83
Associate

Hello,

i'm developing an application using STM32U083 where i need to use USB CDC class. 

My demo is based on NUCLEO-U083RC board with STM32CubeIDE 1.15.1; i mounted an external USB-B connector on PA11/PA12 pins. I would like to use USB-X firmware stack; i used it in standalone mode on an old STM32L476G-DISCO board and it works fine.

I've followed the @B.Montanari guide and it was very clear.

With STM32U083 i have an issue...my host pc cannot recognize device but with any error. it seems to be totally disconnected, there is any activity and the microcontroller not trigger any interrupt on USB module so i think the USBX stack cannot work.

I checked with oscilloscope DP/DM but i see that the lines are both low, it seems the micro doesn't pulling up DP line and it explains why the host doesn't start any transaction.

Furthermore, if i solder a 1.5K external pullup resistor on PA12 -> 3.3V the host start enumerating but then fails but in this case the firmware doesn't trigger any usb-related interrupt too. 

I'm not sure if i have to do something (and how to if yes) on VBUS detection; i have on PA10 pin a voltage divider from +5 VBUS on the connector but i'm not sure on what to do here (pulling up D+ for example or trigger a reset).

The HAL/USBX stack launch the device usb-phy at last this way

 

 

 

 

/* Enabling DP Pull-UP bit to Connect internal PU resistor on USB DP line */
  USBx->BCDR |= USB_BCDR_DPPU;

 

 

 

 

I see in datasheet that this enable pull up on D+ pin but i cannot see any voltage on this PA12. 

In addition, in the STM32L476G-DISCO firmware the GPIO pins are configured as Alternate Function 10 but in the STM32U083 are not configured at all (perhaps it is not needed for this micro).

Could anyone help me? 

Thanks and sorry for my english

 

1 ACCEPTED SOLUTION

Accepted Solutions
marco_virg83
Associate

I've solved by myself...

I think it is a lack of configuration on STM32Ide.

The USB peripheral was not powered on by the autoconfiguration tool; i've searched on datasheet about powering peripheral and simple adding 

HAL_PWREx_EnableVddUSB();

And everything worked like a charm.

I don't know why the HAL routines by default not power this device, perhaps it is a bug in the code generator.

 

Hope it helps

View solution in original post

2 REPLIES 2
marco_virg83
Associate

I've solved by myself...

I think it is a lack of configuration on STM32Ide.

The USB peripheral was not powered on by the autoconfiguration tool; i've searched on datasheet about powering peripheral and simple adding 

HAL_PWREx_EnableVddUSB();

And everything worked like a charm.

I don't know why the HAL routines by default not power this device, perhaps it is a bug in the code generator.

 

Hope it helps

FBL
ST Employee

Hi @marco_virg83 

Thank you for your feedback.

An internal ticket is submitted to fix this issue 184680. 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.