2025-08-02 6:25 AM
Hello team,
Good day,
I am having USB Disconnect Issue with my custom board based on STM32F303 Device, configured as USB HID in Firmware with Full speed. Schematics attached here with.
It is Self-Powered board and no VBUS Detection implemented, Currently.
USB Cable from HOST PC will always plugged into our Board and upon power on it detects the Board as HID device successfully. and communication works fine as well.
Issue is : During real-time communication windows HID Function finds device disconnected. PC application is based on MFC VC++.
We are not sure if it is beacuse of Noise or Immidiate VBUS Detection ?
Regards,
Bsuthar
2025-08-02 6:41 AM
Schematic is fine.
Could be a software issue, or cable issue, or PC software issue.
2025-08-04 7:01 AM
Hi @bsuthar
If the USB device is self-powered, VBUS sensing is mandatory. It is recommended to add a simple VBUS detection circuit (e.g., voltage divider or comparator) to sense 5 V from USB host. Detect VBUS presence in your firmware before enabling USB peripheral and Handle USB detach/attach events properly.
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.
2025-08-05 9:28 PM - edited 2025-08-06 1:27 AM
Hi TDK,
We use Shielded High Quality cable from Samsung , 1.8 Meter Length.
PC Software Uses standard HID Write / read Function from Windows It self. OS is Win10.
Firmware is based on ST`s HAL USB HID Library.
1. Would it be good to add Common mode Filter between USB connector & STM32 (i.e 260Ω@100MHz 310mA 500mΩ 50V ) ?
2. Any distance Trace length limitation on Layout side , Currently it is 45 mm between MCU & Connector...
3. For Schematic, ST USB training says to connect VBUS to I/O line of USLC6-4S ESD Chip , Instead connecting it to its VBUS pin.
2025-08-05 9:34 PM
Thank you , FBL
OK. We will Try to implement. I believe STM32F3 device is not PA9 enable for VBUS Detection, We may have to use EXT on GPIO.
1. Do you Recommend such application where EXT GPIO used as VBUS detection @ HAL code Level ?
2. Just to confirm , Do you believe absence of VBUS Detection will also create issue after Enumeration , I mean after power tup and during the Run-time ?
Regards,