UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
1185 of 1269
NXP Semiconductors
UM10503
Chapter 46: LPC43xx flash programming/ISP and IAP
46.7.15 Set active boot flash bank <flash bank>
This command is only valid if two flash banks exist on the part and selects one of the two
banks for booting from flash. The command inserts a valid signature (see
) in the selected flash bank and invalidates the signature in the other flash
bank. After a reset, the part will boot from the selected flash bank and apply any code read
protection (CRP) that is included in the flash image of the selected bank to the entire flash
(bank A and bank B).
The set active boot flash bank command is disabled with CRP levels 1, 2, and 3. This
means that the boot flash bank cannot be changed if CRP is enabled. If CRP is included
in the new flash image to be activated by this command, ensure that the flash image
content is executing as expected. Otherwise, the part may fail to boot after reset and, for
CRP level 3, external boot or ISP may not be accessible to update the flash.
Return Code
CMD_SUCCESS | (Source and destination data are equal)
COMPARE_ERROR | (Followed by the offset of first mismatch)
COUNT_ERROR (Byte count is not a multiple of 4) |
ADDR_ERROR |
ADDR_NOT_MAPPED |
PARAM_ERROR |
Description
This command is used to compare the memory contents at two locations. This
command is blocked when any level of code read protection is enabled.
Example
"M 436207616 268435968 4<CR><LF>" compares 4 bytes from the RAM address
0x1000 0200 to the 4 bytes from the flash address 0x1A00 0000.
Table 1040.ISP Compare command
Command
M
Table 1041.ISP Set active boot flash bank command
Command
S
Input
Flash bank
: Selects flash bank A or B for booting if the part supports more than on
bank. (0 = flash bank A, 1 = flash bank B).
Return Code
INVALID_FLASH_UNIT |
INVALID_SECTOR |
COMPARE_ERROR |
USER_CODE_CHECKSUM |
DST_ADDR_ERROR |
BUSY | ERROR_SETTING_ACTIVE_PARTITION
Description
This command is only valid if there are two flash banks. It is used to enable booting
from the indicated flash unit by inserting valid signature and invalidating the other
flash unit. This command will not work if zeros are found where a vector table is
expected.
Remark:
An invalid image in the selected flash unit can cause boot failure and
even a system lockup when CRP3 is set.
Example
“S 0 <CR><LF>” selects flash bank A