Datasheet

s_currRecvBuf[USB_DEVICE_CONFIG_CDC_ACM][DATA_BUFF_SIZE];
USB_DMA_NONINIT_DATA_ALIGN(USB_DATA_ALIGN_SIZE) static uint8_t
s_currSendBuf[USB_DEVICE_CONFIG_CDC_ACM][DATA_BUFF_SIZE];
The value of the macro DATA_BUFF_SIZE is 64.
The buffer configuration of non-control endpoint of the OUT direction is performed in the
USB_DeviceCdcVcomSetConfigure()
function after the USB device receives the SetConfiguration standard request from the host, while the EP Buffer of the IN direction
is configured before the data will be sent using this IN endpoint.
5 Software workflow chart
The code used in this application note is based on the
usb_device_composite_cdc_vcom_cdc_vcom_lite
example in the SDK. The architecture of the USB Device stack is shown in
Figure 4.
Figure 4. SDK USB Device protocol stack architecture
The USB Device protocol stack is the middle part of the architecture and consists of a universal controller driver, a specific
controller driver, and an RTOS (Real-Time Operating System) adaptation layer. The parts marked with yellow in the architecture
diagram are used in this application note, using the Lite version of the application.
Universal Controller Driver—This provides a unified interface for applications, and users do not need to care about the
details of different hardware controllers.
Specific controller drivers—There are many types of USB controllers, each of which implements a specific driver. The
USB device controller of the K32L2 series MCU is a Kinetis Full-speed USB device controller.
RTOS Adaptation Layer—This USB protocol stack can operate not only in different RTOS environments but also in bare-
board environments. RTOS is not used in this application note.
The corresponding relationship between the source code and the USB protocol stack architecture in the project is shown in
Figure 5.
NXP Semiconductors
Software workflow chart
USB to Multi VCOM on K32L2 Series MCU, Rev. 0, November 2019
Application Note 8 / 25