UM11029
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
26 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
5.4 USART ISP communication protocol
All USART 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 plain binary format.
5.4.1 USART ISP initialization
Once the USART ISP mode is entered, the auto-baud routine needs to synchronize with
the host via the serial port (USART).
The host should send a ’?’ (0x3F) as a synchronization character and wait for a response.
The host side serial port settings should 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 to this, the
host should send back 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 should
respond by sending the crystal frequency (in kHz) at which the part is running. The
response is required for backward compatibility of the boot loader code and is ignored.
"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. In USART ISP mode, the part is clocked by the FAIM
configuration and the crystal frequency is ignored.
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 5.5 “USART ISP commands”
.
5.4.2 USART ISP command format
"Command Parameter_0 Parameter_1 ... Parameter_n<CR><LF>" "Data" (Data only for
Write commands).
5.4.3 USART 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).
5.4.4 USART ISP data format
The data stream is in plain binary format.