You need to test, we're here to help.

You need to test, we're here to help.

11 September 2015

For UART Debugging, Triggering is Key

A typical screen capture of UART serial decode/trigger software
Figure 1: A typical screen capture of UART
serial decode/trigger software
In our survey of how modern oscilloscopes and trigger/decode software (Figure 1) can ease the task of debugging embedded systems, we've covered the I2C and SPI protocols. Now we'll turn to the UART format, where triggering capabilities are of particular importance.

The Universal Asynchronous Receiver/Transmitter (UART) format supports a raft of different protocols. Perhaps the best-known of the lot is the venerable RS-232 protocol. The UART bus is an asynchronous type with rates that vary widely across different applications. It comprises a receive line, transmit line, and various handshaking communication lines that depend on the use case. The basic UART packet format consists of a start bit; 5 to 9 data bits; an optional parity bit; and either 1, 1.5, or 2 stop bits (Figure 2).

A representative UART packet's makeup
Figure 2: A representative UART packet's makeup
Because the UART protocol is so broadly configurable, any trigger/decode software used for debugging must be equally malleable. That means a completely customizable trigger configurable for any UART signal; a preset RS-232 mode is a handy attribute.

A fully customizable trigger means that the oscilloscope can trigger on any UART-based signal, even if the bus protocol is proprietary, by selecting the appropriate bit rate, parity, bus polarity, bit order, and stop-bit settings. The software also should support both 8- and 9-bit formats.

With properly equipped serial trigger/decode software, you can trigger on specific data values on a UART-based bus. The trigger may be set up by entering a data pattern in either binary or hex formats. With binary triggering, you gain the flexibility of triggering on individual bits in a pattern, while hex triggering simplifies the setup of long data-pattern triggers. Patterns of up to 12 bytes are supported. Another feature of a powerful serial trigger/decode package is conditional trigger settings such as less than, greater than, in range, and out of range. These can really help you get a handle on abnormalities in a UART signal.

No comments:

Post a Comment