Create MSC Applications explains how to program a USB Mass
Storage Device using the RL-USB Library. Mass Storage applications
control USB sticks, cameras, or other external storage devices.
The library that matches the device core: USB_CM1.lib - for Cortex-M1 devices. USB_CM3.lib - for Cortex-M3 devices. USB_ARM_L.lib - for ARM7 or ARM9 devices.
usb_config.c - to configure the USB system.
usbd_device family.c(.h) - to configure the
device hardware layer.
DiskImg.c - to provide the disk image.
usbd_user_msc.c - to adapt the code to the application
needs.
USBD_Demo.c - to initialize and connect the USB Device
from main().
..
usbd_init(); // USB Initialization
usbd_connect(__TRUE); // USB Connect
..
Applications can be created using existing µVision MSC
projects.
Copy all files from any folder
\ARM\Boards\Vendor\BoardName\RL\USB\Device\Memory
to a new folder and open the project *.uvproj with µVision.
RTX projects are using the RTX-RTOS, whereas simple
Memory projects work without an RTOS. However, the USB
configuration does not differ.
Open the file usb_config.c and configure the USB device
with the Configuration
Wizard.
Enable USB Device and set the device characteristics.
Enable Class Support and Mass Storage Device
(MSC) and set the characteristics.
Optionally, adapt the source file usbd_device
family.c that contains hardware dependent code.
Optionally, modify the file DiskImg.c.
Modify the file usbd_user_msc.c to adapt the code to the
application needs.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.