Electronics > Microcontrollers

usb 2.0 FS hardwired device implementation without VBUS sense

(1/3) > >>

I have a need to implement a USB device that is hardwired to a Linux MPU. For mechanical reasons, 3 wires would be ideal (D+, D-, and REF).
The device is self-powered, and while both the Linux MPU and the device are powered from same PSU, the device will boot much faster.
The device is hard-wired: no unplugging/plugging of cables when it's on. It is implemented via a mainstream STM32 with ST's libs.

>Do I need to add a 4th wire for 5V VBUS from host to device?
>What is the risk/danger if I don't?
>What is the role of VBUS sense per USB standard spec for self-powered devices? From what I can tell it is to avoid having live pull-ups on USB DP/DM, but that seems like a lame reason and there must be more.

There is no need for VBUS sensing for any type of device. Self powered devices can just ignore it. A lot of MCUs have a way to fake VBUS state or provide control over the pull-up resistors though a register bit.

IIRC, VBUS sense is handy for detecting a cable disconnect, for various reasons. But if you never disconnect the cable then probably not needed.

You can detect cable disconnect by the lack of SOF interrupts.

OK; sure. Probably VBUS is actually needed for the detection of OTG device attachment. It's a good point though. From my project notes:

PA9 is used to sense incoming USB +5V.
PA9 is actually used even as a USB Slave, to detect when a cable (from a Controller) has been plugged or unplugged. That event is used to re-init the USB Slave. This may help:
More here

My product does not support OTG mode. Reasons for not supporting OTG are (a) customers expect all slaves to work with it but most won't (b) available power is limited.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod