Skip to main content
Associate
May 3, 2024
Solved

USB without VBUS

  • May 3, 2024
  • 1 reply
  • 1417 views

I am trying to send data with an STM32F105RB microcontroller. I have configured it using STM32CubeMX with USB_Device as CDC (Virtual COM Port) and USB_OTG_FS in Device_Only mode. I have not activated SOF or VBUS. Here is the code I am using:

 

while (1) {
HAL_Delay(150);
sprintf(buf_tx,
"hello luxae 2\r\n");
CDC_Transmit_FS((uint8_t*)buf_tx, strlen(buf_tx));
HAL_Delay(150);
}

This code works correctly on a USB where the VBUS pin is connected to 5V, but it does not work on another USB where the VBUS is not connected. The configuration is the same in both cases.

Any idea what could be going on? How can I make the USB work without being connected to the 5 volts of the board or the microcontroller VBUS?

Any help or suggestions would be greatly appreciated! Thanks in advance!

This topic has been closed for replies.
Best answer by FBL

Hi @luxae 

Check this knowledge base article Management of VBUS sensing for USB device design - STMicroelectronics Community it should be helpful!

1 reply

FBLBest answer
Technical Moderator
May 3, 2024

Hi @luxae 

Check this knowledge base article Management of VBUS sensing for USB device design - STMicroelectronics Community it should be helpful!

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.Best regards,FBL