Philips LPC213 Series User Manual page 218

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
the received characters to verify synchronization. If synchronization is verified then
"OK<CR><LF>" string is sent to the host. Host should respond by sending the 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 should be "10000<CR><LF>". "OK<CR><LF>" string is
sent to the host after receiving the crystal frequency. If synchronization is not verified then
the auto-baud routine waits again for a synchronization character. For auto-baud to work
correctly, the crystal frequency should 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 20.8 "ISP commands" on page
20.4.3 Communication protocol
All ISP commands should be sent as single ASCII strings. Strings should 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.
20.4.4 ISP command format
"Command Parameter_0 Parameter_1 ... Parameter_n<CR><LF>" "Data" (Data only for
Write commands)
20.4.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)
20.4.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 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 should
send the check-sum after transmitting 20 UU-encoded lines. The length of any
UU-encoded line should not exceed 61 characters(bytes) i.e. it can hold 45 data bytes.
The receiver should compare it with the check-sum of the received bytes. If the check-sum
matches then the receiver should respond with "OK<CR><LF>" to continue further
transmission. If the check-sum does not match the receiver should respond with
"RESEND<CR><LF>". In response the sender should retransmit the bytes.
A description of UU-encode is available at http://www.wotsit.org.
20.4.7 ISP flow control
A software XON/XOFF flow control scheme is used to prevent data loss due to buffer
overrun. When the data arrives rapidly, the ASCII control character DC3 (stop) is sent to
stop the flow of data. Data flow is resumed by sending the ASCII control character DC1
(start). The host should also support the same flow control scheme.
User manual
222.
Rev. 01 — 24 June 2005
UM10120
Chapter 20: Flash Memory
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
218

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2131Lpc2132Lpc2134Lpc2136Lpc2138

Table of Contents