Configuration of the USB Device MSC Class in µVision.
Configuration of the USB Device MSC Class in µVision.
This configuration file defines:
- The assignment of the MSC class to the USB Device instance.
- USB Endpoint assignments for the MSC class with parameters for Full/Low-speed and High-speed communication.
- Class Settings for the Interface Descriptor.
These settings are used to create the Interface Descriptor and Endpoint Descriptor of the related USB Device Class. It is important that the settings match the application specific behavior in the related C source file USBD_User_MSC_n.c.
MSC Class Configuration File
The USB Device MSC Class configuration file USBD_Config_MSC_n.h contains the following settings:
- Assign Device Class to USB Device # selects USB Device that is used for this Device Class instance.
- Bulk Endpoint Settings
- Bulk IN Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Bulk OUT Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Endpoint Settings
- Maximum Endpoint Packet Size (in bytes) specifies the physical packet size used for information exchange. This setting is available for low-/full- and high-speed devices.
- Maximum NAK Rate specifies the interval in which Bulk Endpoint can NAK. This setting is available only for high-speed devices.
- Mass Storage Class Settings
- Mass Storage Class Interface String is used to create USB Descriptors.
- Number of Logical Units (LUN) specifies the number of logical units in a USB device (up to four).
- Logical Unit n Inquiry Data is returned on Get Inquiry request for Logical Unit n from the USB Host.
- Vendor Identification specifies the vendor of the MSC device.
- Product Identification specifies the MSC device.
- Product Revision Level specifies the product revision of the MSC device.
- Maximum Mass Storage Device Bulk Buffer Size is used to create USB Descriptors.
- OS Resources Settings .
- Mass Storage Class Thread Stack Size is used for memory allocation in the USB component.
- The default Mass Storage Device Class Thread priority is osPriorityAboveNormal. This priority can be changed by changing USBD_MSCn_THREAD_PRIORITY define in this configuration file. This priority needs to be high enough so that USB Stack can react to USB events in a timely manner. Due to this requirement it is recommended to keep this setting at default.