Choose CDC serial settings

… visits
Parent Previous Next

For the first USB-only test, use 115200, 8 data bits, no parity, one stop bit and no flow control. These choices describe a serial connection; they do not set the USB bus speed.

CDC tab set to 115200 baud, one stop bit, no parity, eight data bits, notification interval 16 ms, and Require host DTR unchecked.

These are useful starting settings for a USB serial test. If you enable Require host DTR, the PC program must also turn DTR on.

Option

What to choose and what it does

USB_CDC_BAUD

Initial baud, normally 115200; custom values 1–4294967295. It does not set the USB transfer speed.

USB_CDC_STOP

Encoded stop bits: 0 = one; 1 = one-and-a-half; 2 = two.

USB_CDC_PARITY

0 none; 1 odd; 2 even; 3 mark; 4 space.

USB_CDC_BITS

5, 6, 7, 8 or 16; normally 8. The report arrays remain Byte arrays.

USB_CDC_PROTOCOL

Normally 0, no class-specific protocol. 1 advertises AT/V.250; 255 advertises vendor-defined. The stack does not implement an AT interpreter.

USB_CDC_NOTIFY_MS

Host polling interval for serial-status notifications, 1–255 ms; normally 16. It is not a data-send timer.

USB_CDC_REQUIRE_DTR

0 permits data without DTR; 1 makes data APIs return USB_OFFLINE until the host asserts DTR.

The PC can change these starting settings when it opens the port. For a USB-to-UART bridge, your code must apply supported settings to the UART and move bytes between USB and UART.


For a USB-only connection, these are stored settings. They do not change the USB speed or packet size, add parity bytes, or slow the stream to the selected baud rate. Your PC program or UART may offer fewer choices than the CDC format allows.

See also

Created with the Personal Edition of HelpNDoc: Elevate Your Help Documentation with a Help Authoring Tool