SILICON LABS Usb Device CDC ACM Class
![]()
Spesifikasi
- Perangkat USB Kelas CDC ACM
- Perangkat USB Kelas Dasar CDC Berakhirview
Informasi Produk
This product is a USB device that supports the Communications Device Class (CDC) class and the associated CDC subclass, specifically the Abstract Control Model (ACM) subclass for serial emulation.
CDC Device Composition
A CDC device consists of at least one Communication Class Interface (CCI) and zero or more Data Class Interfaces (DCIs) to provide communication capabilities. In a CDC composite device,multiple functions can be implemented with different sets of CCI and DCI(s).
Endpoints Usage
The CDC device typically uses the following combination ofendpoints:
- A pair of control IN and OUT endpoints for default communication.
- An optional bulk or interrupt IN endpoint.
- A pair of bulk or isochronous IN and OUT endpoints (isochronous endpoints are not currently supported by Silicon Labs USB device
stack).
CDC Endpoint Usage Table
| Titik akhir | Arah | Penggunaan Antarmuka |
|---|---|---|
| Kontrol DI | Device-to-CCI | Standard requests for enumeration, class-specific requests, device management, and optionally call management. |
| Kontrol KELUAR | Host-to-CCI | Standard requests for enumeration, class-specific requests, device management, and optionally call management. |
| Interrupt or bulk IN | Device-to-CCI | Events notification, such as ring detect, serial line status, status jaringan. |
| Bulk or isochronous IN | Device-to-DCI | Komunikasi data mentah atau terformat. |
| Bulk or isochronous OUT | Host-to-DCI | Komunikasi data mentah atau terformat. |
Petunjuk Penggunaan Produk
Pengaturan dan Koneksi
- Connect the USB device to your computer using an appropriate USB cable.
Komunikasi Data
- Use the provided software to establish communication with the USB device.
Pengujian Fungsionalitas
Send/receive data through the designated endpoints to test the functionality of the CDC device.
Perangkat USB Kelas CDC ACM
This section describes the Communications Device Class (CDC) class and the associated CDC subclass supported by Silicon Labs’ USB Device stack. Silicon Labs USB-Device currently supports the Abstract Control Model (ACM) subclass, which is commonly used for serial emulation. CDC includes various telecommunication and networking devices. Telecommunication devices encompass analog modems, analog and digital telephones, ISDN terminal adapters, etc. For example, networking devices contain ADSL and cable modems, Ethernet adapters, and hubs. CDC defines a framework to encapsulate existing communication services standards, such as V.250 (for modems over telephone network) and Ethernet (for local area network devices), using a USB link. A communication device is in charge of device management, call management when needed, and data transmission. CDC defines seven major groups of devices. Each group belongs to a model of communication, which may include several subclasses. Each group of devices has its own specification document besides the CDC base class. The seven groups are:
- Public Switched Telephone Network (PSTN), devices including voiceband modems, telephones, and serial emulation devices. Integrated Services Digital Network (ISDN) devices, including terminal adaptors and telephones.
- Ethernet Control Model (ECM) devices, including devices supporting the IEEE 802 family (ex.: cable and ADSL modems, WiFi adapters).
- Asynchronous Transfer Mode (ATM) devices, including ADSL modems and other devices connected to ATM networks (workstations, routers, LAN switches).
- Wireless Mobile Communications (WMC) devices, including multi-function communications handset devices used to manage voice and data communications.
- Ethernet Emulation Model (EEM) devices which exchange Ethernet-framed data.
- Network Control Model (NCM) devices, including high-speed network devices (High Speed Packet Access modems, Line Terminal Equipment)
- CDC dan implementasi subkelas terkait mematuhi spesifikasi berikut:
- Universal Serial Bus, Definisi Kelas untuk Perangkat Komunikasi, Revisi 1.2, 3 November 2010. Universal Serial Bus, Komunikasi, Subkelas untuk Perangkat PSTN, Revisi 1.2, 9 Februari 2007.
Perangkat USB Kelas Dasar CDC Berakhirview
Perangkat CDC terdiri dari antarmuka berikut untuk menerapkan kemampuan komunikasi:
- Communications Class Interface (CCI) is responsible for the device management and optionally the call management. The device management enables the general configuration and control of the device and the notification of events to the host. The call management enables calls establishment and termination. Call management might be multiplexed through a DCI. A CCI is mandatory for all CDC devices. It identifies the CDC function by specifying the communication model supported by the CDC device. The interface(s) following the CCI can be any defined USB class interface, such as Audio or a vendor-specific interface. The vendor-specific interface is represented specifically by a DCI. Data Class Interface (DCI) is responsible for data transmission. Data transmitted and/or received do not follow a specific format. Data could be raw data from a communication line, data following a proprietary format, etc. All the DCIs following the CCI can be seen as subordinate interfaces.
- A CDC device must have at least one CCI and zero or more DCIs. One CCI and any subordinate DCI together provide a feature to the host. This capability is also referred to as a function. In a CDC composite device, you could have several functions. Therefore, the device would be composed of several sets of CCI and DCI(s) as shown in Figure – CDC Composite Device.

Perangkat CDC kemungkinan menggunakan kombinasi titik akhir berikut:
- A pair of control IN and OUT endpoints called the default endpoint.
- An optional bulk or interrupt IN endpoint.
- A pair of bulk or isochronous IN and OUT endpoints. Note that Silicon Labs USB device stack does not currently support isochronous endpoints.
Tabel di bawah ini menunjukkan penggunaan berbagai titik akhir dan antarmuka CDC tempat titik akhir tersebut digunakan.
Tabel – Penggunaan Titik Akhir CDC
| Titik akhir | Arah | Antarmuka | Penggunaan |
| Kontrol DI | Device-to- host | CCI | Standard requests for enumeration, class-specific requests, device management, and optionally call management. |
| Kontrol KELUAR | Host-to- device | CCI | Standard requests for enumeration, class-specific requests, device management, and optionally call management. |
| Interrupt or bulk IN | Device-to- host | CCI | Pemberitahuan kejadian, seperti deteksi dering, status saluran serial, status jaringan. |
| Bulk or isochronous IN | Device-to- host | DCI | Komunikasi data mentah atau terformat. |
| Bulk or isochronous OUT | Host-to- device | DCI | Komunikasi data mentah atau terformat. |
- Sebagian besar perangkat komunikasi menggunakan titik akhir interupsi untuk memberi tahu host tentang kejadian. Titik akhir isokron tidak boleh digunakan untuk transmisi data ketika protokol proprietary bergantung pada transmisi ulang data jika terjadi kesalahan protokol USB. Komunikasi isokron secara inheren dapat kehilangan data karena tidak memiliki mekanisme coba ulang.
- Tujuh model komunikasi utama mencakup beberapa subkelas. Sebuah subkelas menjelaskan bagaimana perangkat seharusnya menggunakan CCI untuk menangani manajemen perangkat dan manajemen panggilan. Tabel di bawah ini menunjukkan semua subkelas yang memungkinkan dan model komunikasi yang dimilikinya.
Tabel – Subkelas CDC
|
Subkelas |
Model Komunikasi |
ExampJumlah Perangkat yang Menggunakan Subkelas Ini |
| Direct Line Control Model | PSTN | Perangkat modem yang dikontrol langsung oleh host USB |
| Model Kontrol Abstrak | PSTN | Perangkat emulasi serial, perangkat modem yang dikontrol melalui set perintah serial |
Lebihview
|
Subkelas |
Model Komunikasi |
ExampJumlah Perangkat yang Menggunakan Subkelas Ini |
| Model Kontrol Telepon | PSTN | Perangkat telepon suara |
| Multi-Channel Control Model | ISDN | Adaptor terminal tarif dasar, adaptor terminal tarif primer, telepon |
| CAPI Control Model | ISDN | Adaptor terminal tarif dasar, adaptor terminal tarif primer, telepon |
| Ethernet Networking Control Model | ECM | DOC-SIS cable modems, ADSL modems that support PPPoE emulation, Wi-Fi adaptors (IEEE 802.11-family), IEEE 802.3 adaptors |
| ATM Networking Control Model | ATM | ADSL modems |
| Model Kontrol Handset Nirkabel | Bahasa Inggris WMC | Peralatan terminal seluler yang terhubung ke perangkat nirkabel |
| Manajemen Perangkat | Bahasa Inggris WMC | Peralatan terminal seluler yang terhubung ke perangkat nirkabel |
| Model Jalur Langsung Seluler | Bahasa Inggris WMC | Peralatan terminal seluler yang terhubung ke perangkat nirkabel |
| OBEX | Bahasa Inggris WMC | Peralatan terminal seluler yang terhubung ke perangkat nirkabel |
| Ethernet Emulation Model | EEM | Devices using Ethernet frames as the next layer of transport. Not intended for routing and Internet connectivity devices |
| Model Kontrol Jaringan | NCM | IEEE 802.3 adaptors carrying high-speed data bandwidth on network |
Kebutuhan Sumber Daya Kelas CDC ACM Perangkat USB dari Inti
Setiap kali Anda menambahkan instans kelas CDC ACM ke konfigurasi USB melalui panggilan ke fungsi sl_usbd_cdc_acm_add_to_configuration() , sumber daya berikut akan dialokasikan dari inti.
| Sumber | Kuantitas |
| Antarmuka | 2 |
| Alternate interfaces | 2 |
| Endpoints | 3 |
| Interface groups | 1 |
Catatan
that those numbers are per configuration. When setting up your SL_USBD_INTERFACE_QUANTITY, SL_USBD_ALT_INTERFACE_QUANTITY, SL_USBD_INTERFACE_GROUP_QUANTITY and SL_USBD_DESCRIPTOR_QUANTITY configuration values, don’t forget to take into account on how many configurations the class will be added. For the SL_USBD_OPEN_ENDPOINTS_QUANTITY configuration value, since endpoints are opened only when a configuration is set by the host, you just need to take into account the number of needed endpoints for a class instance.
Subkelas ACM CDC Perangkat USB Berakhirview
Kelas dasar CDC terdiri dari Antarmuka Kelas Komunikasi (CCI) dan Antarmuka Kelas Data (DCI), yang dibahas secara rinci di Kelas Dasar CDC Perangkat USBview Bagian ini membahas CCI tipe ACM. CCI ini terdiri dari titik akhir default untuk elemen manajemen dan titik akhir interupsi untuk elemen notifikasi. Sepasang titik akhir massal digunakan untuk membawa data yang tidak ditentukan melalui DCI.
Subkelas ACM digunakan oleh dua jenis perangkat komunikasi:
- Perangkat yang mendukung perintah AT (misalnya, modem pita suara). Perangkat emulasi serial yang juga disebut perangkat port COM Virtual.
Terdapat beberapa permintaan khusus untuk subkelas ACM. Permintaan ini memungkinkan Anda untuk mengontrol dan mengonfigurasi perangkat. Daftar lengkap dan deskripsi semua permintaan ACM dapat ditemukan dalam spesifikasi.
Lebihview
Subclass for PSTN Devices, revision 1.2, February 9, 2007=, section 6.2.2. From this list, Silicon Labs9 ACM subclass supports the following:
Tabel – Permintaan ACM yang Didukung oleh Silicon Labs
Subkelas ACM
Subkelas ACM memiliki satu konfigurasi waktu kompilasi yang ditunjukkan dalam tabel di bawah.
Tabel – Definisi Konfigurasi CDC ACM Perangkat USB
Nama Konfigurasi
- SL_USBD_CDC_ACM_SUBCLASS_I NSTANCE_QUANTITY
Keterangan
- Configures the number of subclass instances you will allocate via a call to the function sl_usbd_cdc_acm_create_instance() .
Default Value
- 2
Konfigurasi Instans Kelas CDC ACM Perangkat USB
This section defines the configurations related to the CDC ACM serial class instances.
- Pembuatan Instansi Kelas
- line state interval
- call mgmt capabilities
- p_acm_panggilan_balik
Pembuatan Instansi Kelas
To create a CDC ACM serial class instance, call the function configuration arguments, as described here.
interval_keadaan_garis
This is the interval (in milliseconds) that your CDC ACM serial class instance will report the line state notifications to the host. This value must be a power of two (1, 2, 4, 8, 16, etc).
kemampuan_manajemen_panggilan
Bitmap Kemampuan Manajemen Panggilan. Nilai bitmap yang mungkin adalah sebagai berikut:
| Nilai (bit) | Keterangan |
| SL_USBD_ACM_SERIAL_CALL_MGMT_DEV | Device handles call management itself. |
| SL_USBD_ACM_SERIAL_CALL_MGMT_DATA_CCI_DCI | Device can send/receive call management information over a Data Class interface. |
p_acm_panggilan_balik
Lebihview
p_acm_callbacks is a pointer to a structure of type sl_usbd_cdc_acm_callbacks_t . Its purpose is to give the CDC ACM Class a set of callback functions to be called when a CDC ACM event occurs. Not all callbacks are mandatory and a null pointer ( NULL ) can be passed in the callbacks structure variable when the callback is not needed. The table below describes each configuration field available in this configuration structure.
Table – sl_usbd_cdc_acm_callbacks_t Configuration Structure
See section Registering Event Notification Callbacks for the callback functions exampsaya.
Panduan Pemrograman Kelas ACM CDC Perangkat USB
- This section explains how to use the CDC Abstract Control Model class.
- Inisialisasi Perangkat USB Kelas CDC ACM
- Menambahkan Instansi Kelas CDC ACM Perangkat USB ke Perangkat Anda
- Berkomunikasi Menggunakan Kelas ACM CDC
Inisialisasi Perangkat USB Kelas CDC ACM
To add CDC ACM class functionality to your device, you must first initialize the CDC base class and the ACM subclass by calling the functions sl_usbd_cdc_init() and sl_usbd_cdc_acm_init() . The example below shows how to call sl_usbd_cdc_init() and sl_usbd_cdc_acm_init() using default arguments. Example – Inisialisasi Kelas ACM CDC![]()
Menambahkan Instansi Kelas CDC ACM Perangkat USB ke Perangkat Anda
Untuk menambahkan fungsionalitas kelas CDC ACM ke perangkat Anda, Anda harus membuat sebuah instans, lalu menambahkannya ke konfigurasi perangkat Anda.
- Membuat Instansi Kelas CDC ACM
- Menambahkan Instansi Kelas CDC ACM ke Konfigurasi Perangkat Anda
- Mendaftarkan Panggilan Balik Notifikasi Acara
Lebihview
Membuat Instansi Kelas CDC ACM
Create a CDC ACM class instance by calling the function sl_usbd_cdc_acm_create_instance() . The example below shows how to create a CDC ACM class instance via sl_usbd_cdc_acm_create_instance() .
Example
Creating a CDC ACM Function via sl_usbd_cdc_acm_create_instance()![]()
Menambahkan Instansi Kelas CDC ACM ke Konfigurasi Perangkat Anda
After you have created a CDC ACM class instance, you can add it to a configuration by calling the function sl_usbd_cdc_acm_add_to_configuration() . The example below shows how to call sl_usbd_cdc_acm_add_to_configuration() .
Example
Call to USBD ACM sl_usbd_cdc_acm_add_to_configuration()![]()
- Class number to add to the configuration returned by sl_usbd_cdc_acm_create_instance() .
- Configuration number (here adding it to a Full-Speed configuration).
Mendaftarkan Panggilan Balik Notifikasi Acara
The CDC ACM Serial class can notify your application of any changes in line control or coding via notification callback functions. A callback functions structure can be passed as argument during the ACM instance creation. Note that those callbacks are optional.
Example
CDC ACM Callbacks Registration illustrates the use of the callback registration functions. Example – Implementasi Panggilan Balik CDC ACM menunjukkan sebuah contohample implementasi fungsi panggilan balik.
Lebihview
![]()
Example – Implementasi Panggilan Balik CDC ACM
![]()
- It is important to return false to this function if the line coding applying failed. Otherwise, return true.
Berkomunikasi Menggunakan Kelas ACM CDC
- Status Serial
- Pengkodean Baris
- Kontrol Garis
- Negara Garis
- Komunikasi Instansi Subkelas
Status Serial
Pengkodean Baris
Host USB mengontrol pengodean baris (laju baud, paritas, dll.) perangkat CDC ACM. Jika diperlukan, aplikasi bertanggung jawab untuk mengatur pengodean baris. Terdapat dua fungsi yang disediakan untuk mengambil dan mengatur pengodean baris saat ini, seperti yang dijelaskan pada tabel di bawah ini.
Tabel – Fungsi Pengkodean Baris CDC ACM![]()
Kontrol Garis
Host USB mengontrol kontrol jalur (pin RTS dan DTR, sinyal putus, dan sebagainya) perangkat CDC ACM. Bila diperlukan, aplikasi Anda bertanggung jawab untuk menerapkan kontrol jalur. Sebuah fungsi disediakan untuk mengambil dan mengatur kontrol jalur saat ini, seperti yang dijelaskan dalam tabel di bawah ini.
Tabel – Fungsi Kontrol Garis CDC ACM
![]()
Negara Garis
Host USB mengambil status saluran secara berkala. Aplikasi Anda harus memperbarui status saluran setiap kali berubah. Jika diperlukan, aplikasi Anda bertanggung jawab untuk mengatur status saluran. Dua fungsi disediakan untuk mengambil dan mengatur kontrol saluran saat ini, seperti yang dijelaskan pada tabel di bawah ini.
Table – CDC ACM Line State Functions![]()
Komunikasi Instansi Subkelas
Subkelas ACM Silicon Labs menawarkan fungsi-fungsi berikut untuk berkomunikasi dengan host. Untuk detail lebih lanjut tentang parameter fungsi9, lihat referensi Fungsi Subkelas ACM CDC.![]()
Lebihview
Table – CDC ACM Communication API Summary
sl_usbd_cdc_acm_read() and sl_usbd_cdc_acm_write() provide synchronous communication, which means that the transfer is blocking. In other words, upon calling the function, the application blocks until the transfer is complete with or without an error. A timeout can be specified to avoid waiting forever. The examplembar di bawah ini menunjukkan contoh baca dan tulisampfile yang menerima data dari host menggunakan titik akhir OUT massal dan mengirim data ke host menggunakan titik akhir MASUK massal.
Daftar – Serial Baca dan Tulis Example![]()
- The class instance number created with sl_usbd_cdc_acm_create_instance() provides an internal reference to the ACM subclass to route the transfer to the proper bulk OUT or IN endpoint.
- Your application must ensure that the buffer provided to the function is large enough to accommodate all the data. Otherwise, synchronization issues might happen.
- To avoid an infinite blocking situation, specify a timeout expressed in milliseconds. A value of 809 makes the application task wait forever.
- The application provides the initialized transmit buffer.
Tanya Jawab Umum
Q: Can this product support isochronous endpoints?
A: No, the Silicon Labs USB device stack does not currently support isochronous endpoints.
Q: How many functions can be implemented in a CDC composite device?
A: A CDC composite device can have several functions by combining different sets of CCI and DCI(s).
Dokumen / Sumber Daya
![]() |
SILICON LABS Usb Device Cdc Acm Class [Bahasa Indonesia:] Panduan Pengguna Usb Device Cdc Acm Class, Usb Device Cdc Acm Class, Usb Device, Cdc Acm, Class |
