Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Implementing USB Composite Device with PSoC 3, PSoC 4L, or PSoC 5LP - KBA223141

Implementing USB Composite Device with PSoC 3, PSoC 4L, or PSoC 5LP - KBA223141

Community-Team
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

Version: **

Question:

How should I implement a USBFS composite device for PSoC® 3, PSoC 4L, or PSoC 5LP?

Answer:

USB composite devices are the devices that would enumerate as multiple device classes. For example, if the same device enumerates as CDC and HID class devices, then it would be called as a composite device. PSoC 3, PSoC 4L, or PSoC 5LP can be used to implement composite devices provided the total number of endpoints needed for the composite device class is less than or equal to eight.

The Interface Association Descriptor (IAD) is used to describe two or more interfaces that are associated with a single device function. IADinforms the host that the referenced interfaces are linked together. For example, a USB to UART bridge design has two interfaces associated with it: a control interface and a data interface. The IAD tells the host that these two interfaces are part of the same function, which is a USB-UART, and falls under the communication device class (CDC). This descriptor is not required in all cases of multiple interface designs. If an interface should have different functionality from another interface, then they should remain separate. Usually if the interfaces which belongs to same functionality starts from interface number 0 and are contagious, the enumeration will be fine. However, the second functionality would require an IAD. To be on the safer side, IAD can be used for both the functionalities.

PSoC Creator™ USB Component supports IAD by default. Figure 1 shows the device descriptor for a typical composite device, dual USB CDC class on a single PSoC.

pastedImage_1.png

Figure 1. Device Descriptor Configuration for Composite Device - Dual CDC

Figure 2 shows the configuration for an IAD. In the example, CDC Function 1 consists of two interfaces starting from interface number 0. Fill in the First Interface and Interface Count parameters based on the application. Configure Function Class, Function Subclass, and Protocol as shown in Figure 2.

pastedImage_21.png

Figure 2. IAD Configuration for the CDC Function 1

0 Likes
2723 Views
Contributors