12.5.2 DBGU Serial Port
Communication is performed through the DBGU serial port initialized to 115,200 Baud, 8 bits of data, no parity, 1
stop bit.
12.5.2.1 Xmodem Protocol
The Send and Receive File commands use the Xmodem protocol to communicate. Any terminal performing this
protocol can be used to send the application file to the target. The size of the binary file to send depends on the
SRAM size embedded in the product. In all cases, the size of the binary file must be lower than the SRAM size
because the Xmodem protocol requires some SRAM memory in order to work.
The Xmodem protocol supported is the 128-byte length block. This protocol uses a two-character CRC16 to
guarantee detection of maximum bit errors.
Xmodem protocol with CRC is supported by successful transmission reports provided both by a sender and by
a receiver. Each transfer block is as follows:
<SOH><blk #><255-blk #><--128 data bytes--><checksum> in which:
̶ <SOH> = 01 hex
̶ <blk #> = binary number, starts at 01, increments by 1, and wraps 0FFH to 00H (not to 01)
̶ <255-blk #> = 1’s complement of the blk#.
̶ <checksum> = 2 bytes CRC16
Figure 12-11 shows a transmission using this protocol.
Figure 12-11. Xmodem Transfer Example
Host
Device
C
SOH 01 FE Data[128] CRC CRC
ACK
SOH 02 FD Data[128] CRC CRC
ACK
SOH 03 FC Data[100] CRC CRC
ACK
EOT
ACK
12.5.3 USB Device Port
12.5.3.1 Supported External Crystal / External Clocks
The SAM-BA Monitor only supports a frequency of 12 MHz to allow USB communication for both external crystal
and external clock.
12.5.3.2 USB Class
The device uses the USB Communication Device Class (CDC) drivers to take advantage of the installed PC Serial
Communication software to talk over the USB. The CDC is implemented in all releases of Windows®, beginning
SAMA5D4 Series [DATASHEET]
83
Atmel-11238C-ATARM-SAMA5D4-Datasheet_12-Jul-16