nRF5 SDK v12.2.0
Experimental: USB device library
This information applies to the nRF52840 SoC only.

This chapter explains the details of the USB device (USBD) library implementation in this SDK.

Class brick concept

usb_low_level.svg
USB device architecture overview

The library allows to compose the whole USB device using class bricks:

Controller module

The main task of the controller is to distribute events to the correct blocks. You can also use it to access a class instance, if you know the interface or endpoint number.

The design of this module assumes that it is easy for a higher level module to know the endpoint number for read/write operations. However, for the information that comes from bottom to top, an additional module is required that will direct all the events to the right higher level module.

Every class instance needs a pointer to the data processing function. No matter what type of class it is, this pointer must be in a constant position.

Core module

The main task of the core module is to process all system events and manage the current USB bus state. It also manages the enumeration process gathering all the descriptors from a class instance.

Driver

For detailed driver documentation, refer to Experimental: USBD driver.

Strings

This is a highly customizable string description module. For detailed documentation, refer to USBD library configurable string descriptor module.

Predefined classes

This library provides a number of standard predefined classes that are ready to just instantiate them into the code. For more documentation on these classes, see USB Device library classes implemementation.

USBD library configurable string descriptor module

USB Device library classes implemementation


Documentation feedback | Developer Zone | Subscribe | Updated