UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
219 of 268
NXP Semiconductors
UM10413
MPT612 User manual
vectors in sector 0 of the flash. If the signatures match, the execution control is transferred
to the user code by loading the program counter with 0x0000 0000. Hence the user flash
reset vector must contain a jump instruction to the entry point of the user application code.
If the signature is not valid, the auto-baud routine synchronizes with the host via serial port
0. The host must send a ’?’ (0x3F) as a synchronization character and wait for a response.
The host side serial port settings must be 8 data bits, 1 stop bit and no parity. The
auto-baud routine measures the bit time of the received synchronization character in
terms of its own frequency and programs the baud rate generator of the serial port. It also
sends an ASCII string ("Synchronized<CR><LF>") to the host. In response, the host must
send the same string ("Synchronized<CR><LF>"). The auto-baud routine looks at the
received characters to verify synchronization. If synchronization is verified, then
"OK<CR><LF>" string is sent to the host. The host must respond by sending the value of
crystal frequency (in kHz) at which the part is running. For example, if the part is running
at 10 MHz, the response from the host must be "10000<CR><LF>". "OK<CR><LF>"
string is sent to the host after receiving the crystal frequency value. If synchronization is
not verified, the auto-baud routine waits again for a synchronization character. For
auto-baud to work correctly, the crystal frequency must be greater than or equal to
10 MHz. The on-chip PLL is not used by the boot code.
Once the crystal frequency is received, the part is initialized and the ISP command
handler is invoked. For safety reasons an "Unlock" command is required before executing
the commands resulting in flash erase/write operations and the "Go" command. The rest
of the commands can be executed without the Unlock command. The Unlock command is
required to be executed once per ISP session. The Unlock command is explained in
Section 25.9 “ISP commands” on page 225
.
25.5.3 Communication protocol
All ISP commands must be sent as single ASCII strings. Strings must be terminated with
Carriage Return (CR) and/or Line Feed (LF) control characters. Extra <CR> and <LF>
characters are ignored. All ISP responses are sent as <CR><LF> terminated ASCII
strings. Data is sent and received in UU-encoded format.
25.5.4 ISP command format
"Command Parameter_0 Parameter_1 ... Parameter_n<CR><LF>" "Data" (data only for
write commands).
25.5.5 ISP response format
"Return_Code<CR><LF>Response_0<CR><LF>Response_1<CR><LF> ...
Response_n<CR><LF>" "Data" (data only for read commands).
25.5.6 ISP data format
The data stream is in UU-encode format. The UU-encode algorithm converts 3 bytes of
binary data in to 4 bytes of a printable ASCII character set. It is more efficient than hex
format which converts 1 byte of binary data in to 2 bytes of ASCII hex. The sender must
send the check-sum after transmitting 20 UU-encoded lines. The length of any
UU-encoded line must not exceed 61 characters (bytes) that is, it can hold 45 data bytes.
The receiver must compare it with the check-sum of the received bytes. If the check-sum
matches, then the receiver must respond with "OK<CR><LF>" to continue further
transmission. If the check-sum does not match, the receiver must respond with
"RESEND<CR><LF>". In response, the sender must retransmit the bytes.