Datasheet
...........continued
Command Action Arguments Example
G Go Address# G200200#
V Display version No argument V#
• Mode commands:
–
Normal mode configures SAM-BA Monitor to send/receive data in binary format
– Terminal mode configures SAM-BA Monitor to send/receive data in ASCII format
• Write commands: Write a byte (O), a halfword (H) or a word (W) to the target
– Address: Address in hexadecimal
– Value: Byte, halfword or word to write in hexadecimal
• Read commands: Read a byte (o), a halfword (h) or a word (w) from the target
– Address: Address in hexadecimal
– Output: The byte, halfword or word read in hexadecimal
• Send a file (S): Send a file to a specified address
– Address: Address in hexadecimal
Note: There is a timeout on this command which is reached when the prompt ‘>’ appears before the end
of the command execution.
• Receive a file (R): Receive data into a file from a specified address
– Address: Address in hexadecimal
– NbOfBytes: Number of bytes in hexadecimal to receive
• Go (G): Jump to a specified address and execute the code
– Address: Address to jump in hexadecimal
• Get Version (V): Return the SAM-BA boot version
Note: In Terminal mode, when the requested command is performed, SAM-BA Monitor adds the following
prompt sequence to its answer: <LF>+<CR>+'>'.
17.6.1 UART0 Serial Port
Communication is performed through the UART0 initialized to 115200 Baud, 8, n, 1.
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 smaller than the SRAM size
because the Xmodem protocol requires some SRAM memory to work. Refer to the "Hardware and Software
Constraints" section.
17.6.2 Xmodem Protocol
The Xmodem protocol supported is the 128-byte length block. This protocol uses a two-character CRC-16 to
guarantee detection of a maximum bit error.
The Xmodem protocol with CRC is accurate if both sender and receiver report successful transmission. Each block of
the transfer has the following format:
<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
The figure below shows a transmission using this protocol.
SAM E70/S70/V70/V71 Family
SAM-BA Boot Program
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 80










