Difference between revisions of "emUSB-Device"

From SEGGER Wiki
Jump to: navigation, search
(USB classes)
(Host specifics)
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
Product page: [https://www.segger.com/emusb-device https://www.segger.com/emusb-device]
 
Product page: [https://www.segger.com/emusb-device https://www.segger.com/emusb-device]
   
<div class="toclimit-3">
 
 
__TOC__
 
__TOC__
</div>
 
   
 
== USB classes ==
 
== USB classes ==
Line 18: Line 16:
 
* [[USB_Printer | Printer class]]
 
* [[USB_Printer | Printer class]]
 
* [[UVC | USB video class (UVC)]]
 
* [[UVC | USB video class (UVC)]]
  +
  +
== Host specifics ==
  +
* [[Windows_registry | Windows registry]]
   
 
== Related technologies ==
 
== Related technologies ==
 
* [[WebUSB]]
 
* [[WebUSB]]
  +
* [[MS OS Descriptors]]
 
  +
* [[emUSB-Device FAQ]]
== FAQ ==
 
'''I want to use [[MSD]] and I want to write new files from the firmware so that they appear on the PC / I want to be notified when the PC copied new files onto the [[MSD]] volume and read them, how to do this?'''
 
 
This is not possible. Any modern operating system will read the file system information from the connected medium and will cache it. Meaning that if the firmware writes new files onto the storage the PC will not see them until the device has been re-connected. At worst the PC might overwrite the new files with something. A similar issue exists in the other direction, when a user copies a file from the PC onto the storage medium the PC might cache the write operation and might start to actually write the file at a later time. The order in which the PC writes data or file system information is not fixed, the PC can do whatever it wants, therefore it is not feasible to detect a new file until the device has been disconnected from the PC.
 
 
When a [[MSD | MSC]] device is connected to a USB host the host is the sole master of the storage medium. It can write or read at any point in time. Should the application try to access the storage medium at the same time as the host the results are unpredictable. To resolve this issue the device needs to detach the storage medium from the host, see USBD_MSD_RequestDisconnect(), USBD_MSD_Disconnect() and USBD_MSD_WaitForDisconnection() in the [https://www.segger.com/downloads/emusb-device/UM09001 emUSB-Device documentation]. Alternatively a different protocol, which supports simultaneous handling from both sides can be used - [https://www.segger.com/products/connectivity/emusb-device/add-ons/mtp-class/ MTP]
 

Revision as of 11:56, 11 February 2021

emUSB-Device is SEGGER's USB Device Stack, specifically developed for Embedded Systems.

This wiki page explains and links to other articles providing additional information about emUSB-Device and related technologies.

Product page: https://www.segger.com/emusb-device

USB classes

Host specifics

Related technologies