Virtual Com Port - Detect USB Disconnect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-08-12 2:15 PM
Virtual Com Port - Detect USB Disconnect
#stm32-usb- Labels:
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
''Does anyone have any idea how I might detect the unpluging of the USB ?''
When the USB power disappears?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
I read in ''http://www.beyondlogic.org/usbnutshell/usb2.htm'' that,
''A USB device will enter suspend when there is no activity on the bus for greater than 3.0ms. It then has a further 7ms to shutdown the device and draw no more than the designated suspend current and thus must be only drawing the rated suspend current from the bus 10mS after bus activity stopped. In order to maintain connected to a suspended hub or host, the device must still provide power to its pull up speed selection resistors during suspend.USB has a start of frame packet or keep alive sent periodically on the bus. This prevents an idle bus from entering suspend mode in the absence of data.
- A high speed bus will have micro-frames sent every 125.0 µs ±62.5 ns.
- A full speed bus will have a frame sent down each 1.000 ms ±500 ns.
- A low speed bus will have a keep alive which is a EOP (End of Packet) every 1ms only in the absence of any low speed data.''
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Hi John.F,
Good & clever point- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Thanks to all for this info. I'm working on a project that uses USB and the rev A hardware didn't monitor USB power. Rev B does :)
(Debug output) 08/16/2010 15:20:59.435 USB cable inserted/power added! 08/16/2010 15:20:59.602 USB cable/power removed!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:02 AM
Thanks STOne-32 & John F.
Your idea works really well ! Thanks Clive- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-12-12 1:54 AM
Hi all,
what about detecting cable remove in mass storage option, where bIntPackSOF is not used? Cheers, Peter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-12-12 4:15 AM
Hi,
I found that Mass_Storage_In and Mass_Storage_Out functions sends some data in time interval to the host . I think to set variable in MassStorage In and Out function and reset them in timer. Maybe someone have better idea to detect cable unplug?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-02-17 7:32 AM
I have a similar issue and came across this post, but the ''We have an FAQ on the subject'' is a dead link. Any idea where that has been moved to? Thanks!
