264
SAM4CP [DATASHEET]
43051E–ATPL–08/14
14.5
SAM-BA Monitor
The SAM-BA boot principle:
Once the communication interface is identified, to run in an infinite loop waiting for different commands as shown in
Table
14-2
.
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 time-out 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>+'>'.
Table 14-2.
Commands Available through the SAM-BA Boot
Command
Action
Argument(s)
Example
N
Set Normal mode
No argument
N
#
T
Set Terminal mode
No argument
T
#
O
Write a byte
Address, Value#
O
200001,CA#
o
Read a byte
Address,#
o
200001,#
H
Write a half word
Address, Value#
H
200002,CAFE#
h
Read a half word
Address,#
h
200002,#
W
Write a word
Address, Value#
W
200000,CAFEDECA#
w
Read a word
Address,#
w
200000,#
S
Send a file
Address,#
S
200000,#
R
Receive a file
Address, NbOfBytes#
R
200000,1234#
G
Go
Address#
G
200200#
V
Display version
No argument
V
#