![]() |
nRF5 SDK
v15.3.0
|
Choose documentation: | nRF5 SDK | S112 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
This example uses the USB Mass Storage Class module. See the documentation of this module for links to relevant specification documents.
This example shows how to configure and use the USB Mass Storage Class. A development kit connected to a host will enumerate as a single Mass Storage Class with multiple logical units:
Every logical unit is a block device instance that describes the physical memories. To choose which block devices should be visible as an MSC logical unit, you must modify BLOCKDEV_LIST.
To enable SD card support, set USE_SD_CARD to 1. You must also provide correct SPI pin definitions:
This example allows you to manipulate the file system (on QSPI memory) only while USB is not connected. If USB is connected, access to the file system from a user application is not possible because MSC is not designed to allow access to the file system from multiple sources. To disable FatFS capabilities, set USE_FATFS_QSPI to 0.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\usbd_msc
LED assignments:
Button assignments:
Test the USB MSC Example application by performing the following steps:
On Unix platforms, you can use the dd
command to test the performance of the USB connection. You must execute the command as a root user.