Communication through the UPDI is based on standard UART communication, using a fixed frame
format, and automatic baud rate detection for clock and data recovery. In addition to the
data frame, there are several control frames which are important to the communication. The
supported frame formats are presented in Figure 1.
Figure 1. Supported UPDI Frame formats
- Data Frame
- Consist of 1 start bit (always low), 8 data bits, 1 parity bit (even
parity) and two stop bits (always high). If the start bit, parity bit or stop bits
have an incorrect value, an error will be detected and signalized by the UPDI. The
parity bit check in the UPDI can be disabled by writing the PARD bit in
UPDI.CTRLA, in which case the parity generation from the debugger can be
ignored.
- IDLE Frame
- Special frame which consist of 12 high bits. This is the same as
keeping the transmission line in an IDLE state.
- BREAK
- Special frame which consist of 12 low bits. The BREAK frame is used
to reset the UPDI back to its default state, and is typically used for error
recovery.
- SYNCH
- The SYNCH frame (0x55) is used by the baud rate generator to set the baud rate
for the coming transmission. A SYNCH character is always expected by the UPDI in
front of every new instruction, and after a successful BREAK has been transmitted.
- ACK
- The Acknowledge (ACK) character is transmitted from the UPDI
whenever a ST or STS instruction has successfully crossed the synchronization
boundary, and have gained bus access. When an ACK is received by the debugger, the
next transmission can start.