MCU Flashloader Reference Manual
MCU Flashloader Reference Manual
Document information
Information Content
Keywords MCUFLSHLDRRM, MCU Flashloader. Flashloader, FLSHLDRRM, Flash
programming utility
Abstract This document describes the MCU flashloader, a configurable flash
programming utility that operates over a serial connection on MCUs.
NXP Semiconductors
MCUFLSHLDRRM
MCU Flashloader Reference Manual
1 Introduction
1.1 Overview
The MCU flashloader is a configurable flash programming utility that operates over a
serial connection on MCUs. It enables quick and easy programming of MCUs through the
entire product life cycle, including application development, final product manufacturing,
and more. The MCU flashloader will be delivered as binary or full source code that is
highly configurable. Host-side command line and GUI tools are available to communicate
with the flashloader. Users can utilize host tools to upload and/or download application
code via the flashloader.
1.2 Terminology
target
The device running the bootloader firmware (ROM).
host
The device sending commands to the target for execution.
source
The initiator of a communications sequence. For example, the sender of a command or
data packet.
destination
Receiver of a command or data packet.
incoming
From host to target.
outgoing
From target to host.
This block diagram describes the overall structure of the MCU flashloader.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
– ReadMemoryResponse
– WriteMemory
– FillMemory
– GetProperty
– GetPropertyResponse
– ReceiveSbFile
– Execute
– Call
– Reset
– SetProperty
– FlashProgramOnce/EfuseProgramOnce
– FlashReadOnce/EfuseReadOnce
– FlashReadOnceResponse
– ConfigureMemory
– GenerateKeyBlob
– GenerateKeyBlobResponse
• SB file state machine
– Unencrypted SB image support
• Packet interface
– Framing packetizer
– Command/data packet processor
• Memory interface
– Abstract interface
– Internal RAM/device memory interface
– FlexSPI NOR Memory Interface
– FlexSPI NAND Memory Interface
– SEMC NOR Memory Interface
– SEMC NAND Memory Interface
– SD Card Memory Interface
– eMMC Memory Interface
– SPI NOR FLASH/EEPROM Memory Interface
• Peripheral drivers
– UART
– Auto-baud detector
– USB device
– USB controller driver
– USB framework
– USB HID class
• Property interface
– Get or set bootloader property
– Security support
– Generate key blob for HAB encrypted boot.
Note: Different components are available on different targets. Therefore, some features
might not be supported on some targets.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
2.1 Introduction
This section explains the general protocol for the packet transfers between the host
and the MCU flashloader. The description includes the transfer of packets for different
transactions, such as commands with no data phase, and commands with an incoming
or outgoing data phase. The next section describes the various packet types used in a
transaction.
Each command sent from the host is replied to with a response command.
Commands may include an optional data phase.
• If the data phase is incoming (from the host to MCU flashloader), it is part of the original
command.
• If the data phase is outgoing (from MCU flashloader to host), it is part of the response
command.
Note: In these diagrams, the Ack sent in response to a Command or Data packet can
arrive at any time before, during, or after the Command/Data packet has processed.
Command with no data phase
The protocol for a command with no data phase contains:
• Command packet (from host)
• Generic response command packet (to host)
Host Target
Command
Process Command
Ack
Response
Ack
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Command
Process Command
Ack
Initial Response
Ack
Data Packet
Process Data
Ack
Final Data Packet
Process Data
Ack
Final Response
Ack
Notes
• The host may not send any further packets while it is waiting for the response to a
command.
• The data phase is aborted if, prior to the start of the data phase, the Generic Response
packet does not have a status of kStatus_Success.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
• Data phases may be aborted by the receiving side by sending the final Generic
Response early with a status of kStatus_AbortDataPhase. The host may abort the data
phase early by sending a zero-length data packet.
• The final Generic Response packet sent after the data phase includes the status for the
entire operation.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Command
Process Command
Ack
Initial Response
Ack
Data Packet
Process Data
Ack
Process Data
Ack
Final Response
Ack
Note
• The data phase is considered part of the response command for the outgoing data
phase sequence.
• The host may not send any further packets while the host is waiting for the response to
a command.
• The data phase is aborted if, prior to the start of the data phase, the ReadMemory
Response command packet does not contain the kCommandFlag_HasDataPhase flag.
• Data phases may be aborted by the host sending the final Generic Response early with
a status of kStatus_AbortDataPhase. The sending side may abort the data phase early
by sending a zero-length data packet.
• The final Generic Response packet sent after the data phase includes the status for the
entire operation.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
3.1 Introduction
The MCU Flashloader device works in slave mode. A host initiates all the data
communication, which is either a PC or embedded host. The MCU Flashloader device is
the target, which receives a command or data packet. All data communication between
host and target is packetized.
Note: The term "target" refers to the "MCU Flashloader device".
There are 6 types of packets used:
• Framing packet
• CRC16 algorithm
• Ping packet
• Ping response packet
• Command packet
• Response packet
All fields in the packets are in little-endian byte order.
A special framing packet that contains only a start byte and a packet type is used for
synchronization between the host and target.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The Packet Type field specifies the type of the packet from one of the defined types
(below):
The check result is computed by running the ASCII character sequence "123456789"
through the algorithm.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
{
uint32_t i;
uint32_t byte = src[j];
crc ^= byte << 8;
for (i = 0; i < 8; ++i)
{
uint32_t temp = crc << 1;
if (crc & 0x8000)
{
temp ^= 0x1021;
}
crc = temp;
}
}
return crc;
}
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The header is followed by 32-bit parameters up to the value of the ParameterCount field
specified in the header.
Command packets are also used by the target to send responses back to the host. As
described in section 3.4, command packets and data packets are embedded into framing
packets for all UART transfers.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Flags: Each command packet contains a Flag byte. Only bit 0 of the flag byte is used.
If bit 0 of the flag byte is set to 1, then data packets follow in the command sequence.
The number of bytes that are transferred in the data phase is determined by a command-
specific parameter in the parameters array.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
response tag set to a ReadMemoryResponse tag value (0xA3), the flags field set to
kCommandFlag_HasDataPhase (1).
The parameter count is set to 2 for the status code and the data byte count parameters
shown below.
4.1 Introduction
All MCU flashloader command APIs follows the command packet format wrapped by the
framing packet as explained in previous sections.
See Table 3-9 for a list of commands supported by MCU flashloader.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 00 06 02 4b
0x5a a4 0c 00 f4 9d a7 00 00 02 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 0c 00 00 00
0x5a a4 0c 00 e0 f7 a0 00 00 02 00 00
ACK: 0x5a a1
Response: The target returns a GenericResponse packet with one of following status
codes:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The FlashEraseAll command requires a memory ID. If the memory ID is not specified, the
internal flash (memory ID =0) will be selected as default.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
FlashEraseAll
0x5a a4 08 00 0c 22 01 00 00 01 00 00
00 00
Process Command
ACK: 0x5a a1
Generic Response:
00 00 01 00 00 00
0x5a a4 0c 00 66 ce a0 00 00 02 00 00
ACK: 0x5a a1
Response: The target returns a GenericResponse packet with status code either set to
kStatus_Success for successful execution of the command, or set to an appropriate error
status code.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
ReadMemory Response:
00 00 64 00 00 00
0x5a a4 0c 00 27 f6 a3 01 00 02 00 00
ACK: 0x5a a1
Data packet:
0x5a a5 length16 CRC16 data
Process Data
ACK: 0x5a a1
Generic Response:
00 00 03 00 00 00
0x5a a4 0c 00 0e 23 a0 00 00 02 00 00
ACK: 0x5a a1
Data Phase: The ReadMemory command has a data phase. Because the target works
in slave mode, the host needs to pull data packets until the number of bytes of data
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 04 00 00 00
0x5a a4 0c 00 23 72 a0 00 00 02 00 00
ACK: 0x5a a1
Data packet:
0x5a a5 length16 CRC16 data
Process Data
ACK: 0x5a a1
ACK: 0x5a a1
Generic Response:
00 00 04 00 00 00
0x5a a4 0c 00 23 72 a0 00 00 02 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Data Phase: The WriteMemory command has a data phase. The host sends data
packets until the number of bytes of data specified in the byteCount parameter of the
WriteMemory command are received by the target.
Response: The target returns a GenericResponse packet with a status code set to
kStatus_Success upon successful execution of the command or to an appropriate error
status code.
• To fill with a byte pattern (8-bit), the byte must be replicated 4 times in the 32-bit
pattern.
• To fill with a short pattern (16-bit), the short value must be replicated 2 times in the 32-
bit pattern.
For example, to fill a byte value with 0xFE, the word pattern is 0xFEFEFEFE; to fill a
short value 0x5AFE, the word pattern is 0x5AFE5AFE.
Special care must be taken when writing to flash.
• First, any flash sector written to must have been previously erased with a FlashEraseAll
or FlashEraseRegion command.
• Writing to flash requires the start address to be page size aligned.
• If the VerifyWrites property is set to true, then writes to flash also performs a flash verify
program operation.
When writing to RAM, the start address does not need to be aligned.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 00 06 02 4b
0x5a a4 0c 00 f4 9d a7 00 00 02 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The Jump address, function argument pointer, and stack pointer are the parameters
required for the Execute command. If the stack pointer is set to zero, the called code is
responsible for setting the processor stack pointer before using the stack.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 0a 00 00 00
0x5a a4 0c 00 79 d0 a0 00 00 02 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Response: The target returns a GenericResponse packet with a status code either set to
the return value of the function called or set to kStatus_InvalidArgument (105).
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
Process Command
ACK: 0x5a a1
Generic Response:
00 00 0e 00 00 00
0x5a a4 0c 00 88 1a a0 00 00 02 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Response: upon successful execution of the command, the target (MCU flashloader)
returns a GenericResponse packet with a status code set to kStatus_Success, or to an
appropriate error status code.
Host Target
Process Command
ACK: 0x5a a1
FlashReadOnce Response:
00 00 04 00 00 00 78 56 34 12
0x5a a4 10 00 3f 6f af 00 00 03 00 00
ACK: 0x5a a1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Host Target
ConfigureMemory, memoryID=0x9, configBlockAddr=0x2000[5a a4 0c 00 39 97 11 00 00 02 09 00 00 00 00 20 00 00
ACK:5a a1
Process Command
ACK:5a a1
Data Phase: The ReceiveSBFile command has a data phase. The host sends data
packets until the number of bytes of data specified in the byteCount parameter of the
ReceiveSBFile command are received by the target.
Response: The target returns a GenericResponse packet with a status code set to the
kStatus_Success upon successful execution of the command, or set to an appropriate
error code.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Note:
• Not all targets support selecting ZMK or CMK as the BKEK.
• The GenerateKeyBlob must start with “Operation phase = 0”, and end with “Operation
phase = 1”. The behavior is unpredictable for any other sequence.
Data Phase The GenerateKeyBlob command has a data phase.
At the first step (Operation phase = 0), the host sends data packets until the number of
bytes of DEK specified in the “Key length” parameter of the GenerateKeyBlob command
are received by the target.
At the second step (Operation phase = 1), the host pulls data packets until the
number of bytes of data specified in the “Blob byte count” parameter of the
GenerateKeyBlobResponse.
Response The target returns two type of response packet for each steps.
At the first step, the target returns a GenericResponse packet with a status code.
At the second step, the target returns a GenerateKeyBlobResponse packet with a status
code and the byte count of the key blob.
At the end of the data phase for each steps, the target returns a GenericResponse
packet in response to the result of the data phase.
ACK:5a a1 ACK:5a a1
Process Command
Process Command
GenericResponse5a a4 0c 00 a9 38 a0 00 00 02 00 00 00 00 13 00 00 00 GenerateKeyBlobResponse5a a4 0c 00 0b b9 b3 01 00 02 00 00 00 00 48 00 00 00
ACK:5a a1 ACK:5a a1
Data Packet5a a5 10 00 25 84 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
Process Data
Process Data
Data Packet5a a5xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ……
ACK:5a a1 ACK:5a a1
GenericResponse5a a4 0c 00 a9 38 a0 00 00 02 00 00 00 00 13 00 00 00 GenericResponse5a a4 0c 00 a9 38 a0 00 00 02 00 00 00 00 13 00 00 00
ACK:5a a1 ACK:5a a1
5 Supported peripherals
5.1 Introduction
This section describes the peripherals supported by the MCU flashloader.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Figure 19. Host reads a ping response from target via UART
Figure 20. Host reads a command response from target via UART
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
5.3.2 Endpoints
The HID peripheral uses 3 endpoints:
• Control (0)
• Interrupt IN (1)
• Interrupt OUT (2)
The Interrupt OUT endpoint is optional for HID class devices, but the MCU flashloader
uses it as a pipe, where the firmware can NAK send requests from the USB host.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Each report has a maximum size of 34 bytes. This is derived from the minimum
flashloader packet size of 32 bytes, plus a 2-byte report header that indicates the length
(in bytes) of the packet sent in the report.
Note: In the future, the maximum report size may be increased, to support transfers of
larger packets. Alternatively, additional reports may be added with larger maximum sizes.
The actual data sent in all of the reports looks like:
This data includes the Report ID, which is required if more than one report is defined in
the HID report descriptor. The actual data sent and received has a maximum length of
35 bytes. The Packet Length header is written in little-endian format, and it is set to the
size (in bytes) of the packet sent in the report. This size does not include the Report ID or
the Packet Length header itself. During a data phase, a packet size of 0 indicates a data
phase abort request from the receiver.
6.1 Introduction
This section describes the external memory devices supported by the MCU flashloader.
To use an external memory device correctly, the device must be enabled with the
corresponding configuration profile. If the external memory device is not enabled, then it
cannot be accessed by the flashloader. The MCU flashloader enables specific external
memory devices using memory identifiers, as shown below.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The MCU Flashloader supports read, write, and erase of external Serial NOR Flash
devices via the FlexSPI Module. Before accessing Serial NOR Flash devices, the
FlexSPI module must be configured properly using a simplified FlexSPI NOR Config
option block or a complete 512-byte FlexSPI NOR configuration block. The flashloader
can generate the 512-byte FlexSPI NOR configuration block based on the simplified
Flash Configuration option block for most Serial NOR Flash devices in the market. To
protect Intellectual Property on external Serial NOR Flash, the Flashloader also supports
image encryption and programming using OTPMK/SNVS keys if the chip includes
the BEE or OTFAD module. See the Security Utilities and Section 6.2.3 chapters for
additional information.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Note: To customize the LUT sequence for some specific device, users need to enable
“lutCustomSeqEnable” and fill in corresponding “lutCustomSeq” field specified by the
command index below.
For Serial (SPI) NOR, the pre-defined LUT index is as following:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The FlexSPI NOR Configuration option block is organized by 4-bit unit. It is expandable,
and current definition of the block is as shown in the following table.
The Flashloader detects FNORCB using the read SFDP command supported by most
flash devices that are JESD216(A/B)- compliant. However, JESD216A/B only defines
the dummy cycles for Quad SDR reads. In order to get the dummy cycles for DDR/DTR
read mode, the flashloader supports auto probing by writing test patterns to offset 0x200
on the external memory devices. To get optimal timing, the readSampleClkSrc is set to
1 for Flash devices that do not support external provided DQS pad input. It is set to 3
for flash devices that do support external provided DQS pad input, such as HyperFlash.
FlexSPI_DQS pad is not used for any other purpose.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
4 Option1
Optional flash_connecti drive_strength Reserved [15:8] Dummy Cycle
on[31:28] [27:24] [7:0]
0 - PortA The drive strength dqs_pinmux_ 0 - Use auto-
1 - Parallel Mode of FlexSPI pad. group [23:20] probing dummy
2 - PORTB See IOMUXC 0 - primary group cycle
chapter in SoC 1 - secondary Others - dummy
RM for more group cycles provided in
details. data sheet
pinmux_group
[19:16]
0 - primary group
1 - secondary
group
• Query Command Pad(s) - Command pads (1/4/8) for the SFDP command.
• CMD pad(s) - Commands pads for the Flash device (1/4/8). For devices that use 1-1-4,
1-4-4, 1-1-8, or 1-8-8 mode, CMD pad(s) value is always 0x0. For devices that only
support 4-4-4 mode for high performance, CMD pads value is 2. For devices that only
support 8-8-8 mode for high performance, CMD pads value is 3.
• Quad Enable Type - Specify the Quad Enable sequence. Only applicable for devices
that are JESD216-compliant. This field is ignored if device supports JESD216A or later
version.
• Misc - Specify miscellaneous mode for selected flash type.
• Max Frequency - The maximum frequency for the specified flash device.
• Dummy Cycle - User provided dummy cycles for SDR/DDR read command.
[Link] Programming Serial NOR Flash device using FlexSPI NOR configuration option
block
The MCU Flashloader supports generating complete FNORCB using the configure-
memory command. It also supports programming the generated FNORCB to the correct
offset (0x0/0x400, depending on the MCU model) of the flash memory using a specific
option "0xF000000F". An example for configuring and accessing HyperFlash (assuming it
is a blank HyperFlash device) is mentioned below.
The MCU Flashloader supports selecting the FLEXSPI instance via 0xcf90000<x> on the
SoC which supports multiple FLEXSPI instances, here the x is the index of the FLEXSPI
instance.
Take RT1170 as an example, below is the sequence to select the FLEXSPI instance via
the Flashloader:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
[Link] FlexSPI Instance Selection using FlexSPI NOR configuration option block
For certain MCU parts, multiple instances are available. The MCU Flashloader supports
instance selection via the FlexSPI NOR configuration option block.
4 Context 1 Start Bus address of the mandatory first context’s start. For example,
Addr 0x60001000
8 Context 1 End Bus address of the mandatory first context’s end. For example,
Addr 0x60001fff
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
An example of configuring and accessing a blank serial NOR flash is given below. Prior
to the example, the flash should have been configured as stated in Section 6.2.1
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The OTFAD keyblob is now programmed with an extra 256k (0x40000) offset. It is
necessary that the FNORCB be programmed with the identical offset, so it is highly
recommended that the FNORCB be embedded in [Link] at the correct offset.
blhost -u -- write-memory 0x60041000 [Link] (also be
programmed with the identical offset)
Note: SNVS keys are constantly 0 if HAB is open. To obtain full confidentiality, the flow
above should be performed on a HAB-closed part with a signed flashloader. In this case,
the bootable [Link] should also be pre-signed.
Some MCUs support booting from Serial NAND Flash devices via BootROM. The MCU
Flashloader works as a companion to program the boot image into the Serial NAND. The
Flashloader supports generating corresponding boot data structures like the FlexSPI
NAND Firmware Configuration Block (FCB) and Discovered Bad Block Table (DBBT)
required by the BootROM. See the System Boot Chapter in the device reference manual
for details regarding FlexSPI NAND boot flow. This chapter only focuses on generating
FCB, DBBT, and programming FCB, DBBT, and boot images using Flashloader.
The Flashloader can configure Serial NAND devices using FCB, or a simplified FCB
option block. The Flashloader can generate a complete FCB based on the simplified FCB
option block.
FCB is a 1024-byte data structure that contains the optimum NAND timings, page
address of Discovered Bad Block Table (DBBT) Search Area firmware info (including the
start page address and page count), and more.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The optimum Serial NAND parameters are defined in FlexSPI NAND configuration block
(FNANDCB). FNANDCB is a 512-byte data structure as shown in the following table.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Note: For Serial (SPI) NAND, the pre-defined LUT index is as follows:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
FlexSPI NAND FCB option block defines the major parameters required by FCB, such as
image info. The detailed configuration block definition is shown below.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Note:
• “searchCount” should match the one provisioned in eFUSE
• “searchStride” should match the one provisioned in eFUSE
• “addressType” specifies the address type for the start address of erase, write and read
operation in Flashloader
• “Option size” specifies the total size of the option block size in longwords
• “nandOptionAddr” specifies the address that stores FlexSPI NAND Configuration
Option
• “imageInfo” is an array that holds each image info used during boot. For example,
0x00040002 means the block Id is 4, maximum allowed block count is 2
Currently, all Serial NAND devices in the market support the same commands. The
differences are the NAND size, page size, and more. This option block focuses on these
differences, and the detailed block definitions are shown below:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Flashloader can generate FCB and DBBT based on a specified FlexSPI NAND FCB
option block.
Assuming FCB parameters are:
• FCB and DBBT copies are 2.
• Firmware copies are 2.
• Firmware 0 starts at block 4, maximum block count is 2.
• Firmware 1 starts at block 8, maximum block count is 2.
Assuming Serial NAND parameters are:
• Flash size: 1 Gb
• Plane number:1
• Pages Per Block: 64
• Page Size: 2 KB
• Maximum Frequency: 80 MHz
Below are the example steps for generating FlexSPI NAND Configuration Option block.
Write FlexSPI NAND Configuration option block to SRAM:
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Some MCUs supports booting from SD/eMMC devices via BootROM. The MCU
Flashloader supports flashing the boot image into the SD/eMMC devices. This section
explains the usage of SD/eMMC via Flashloader.
The SD Card must be initialized before the Flashloader accesses SD memory. The SD
configuration block is a combination of several necessary SD configurations used by
Flashloader to initialize the card.
Table 6-10 lists the detailed description of each bits in the SD configuration block.
Note: Flashloader toggles the [Link] pin to execute the power cycle progress.
This needs board-level hardware support. If the hardware does not support controlling
SD power, the power cycle progress cannot fully reset the SD card.
Note: UHSI timing includes SDR50, SDR104, and DDR50.
This section uses the SDR25 timing and 4-bit bus width as an example. To make sure
the SD card is reset before the initialization progress, it is suggested to enable the power
cycle. Choose the default settings of power cycle.
The hex of the SD configuration block is 0xD0082100.
• Write the configuration block to MCU internal RAM.
blhost -u –– fill-memory 0x20000000 0x4 0xD0082100
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
RAM address 0x20000000 is selected as an example. User can select any RAM
position which is available to use. The user can also select an address located at an
XIP external memory, such as Flex SPI NOR Flash.
• Execute the initialization progress using configure-memory command.
blhost -u –– configure-memory 0x120 0x20000000
0x120 is the memory ID of eMMC card device. If the eMMC card is initialized
successfully, then a “Success” message is received and SD memory is available to be
accessed by Flashloader. If an error occurred, see Chapter 8 Appendix A, "Status and
error codes". for debugging.
• After SD is initialized, the user can use get the property 25 command to check the SD
card capacity.
blhost -u –– get-property 25 0x120
• To program the boot image, the user needs to erase the SD card memory first, then
program the image.
0x0 at the flash-erase-region command line and 0x400 at the write-memory command
line is the byte offset of the SD memory, not the sector offset. That means 4 K bytes
starting from the start address of SD memory are erased, then the boot image C:
\Image\[Link] is written to the space starting from SD second Block.
• To check if the boot image is programmed successfully, the user can read the data out.
blhost –u –– read-memory 0x400 0x1000 0x120
In most cases, the user does not need to read the data out to verify if the boot image is
written successfully or not. Flashloader guarantees this.
Similar to the SD Card, eMMC also must be initialized before accessing it. The eMMC
configuration block is used to tell Flashloader how to initialize the eMMC device. To use
the fast boot feature offered by BootROM, eMMC also must be pre-configured. The fast
boot configuration is also included in the eMMC configuration block.
The below table lists the detailed description of each bits in the eMMC configuration
block.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
This section uses the 8-bit DDR mode as an example, and boot image is written to the
user data area. After writing the boot image, the user wants boot ROM to boot the image
via fast boot to decrease the boot time. Fast boot also uses the same mode (8-bit DDR
mode). ACK is enabled for fast boot.
The hex of the eMMC configuration block is 0xC0721625, 0x00000000
• Write the configuration block to MCU internal RAM.
RAM address 0x20000000 is selected as an example. The user can select any RAM
position which is available to use. The user also can select an address located at an
XIP external memory, such as Flex SPI NOR Flash.
• Execute the initialization progress using configure-memory command.
blhost -u –– configure-memory 0x121 0x20000000
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
0x121 is the memory ID of eMMC card device. If the eMMC card is initialized
successfully, then a “Success” message is recieved. If an error occurred, see Chapter
9, "Appendix A: status and error codes" for debugging.
• After step 2, eMMC is available to access. The user can use get the property 25
command to check the eMMC card capacity. blhost -u –– get-property 25
0x121
• To program the boot image, the user needs to erase the eMMC card memory before
program the image.
the address of eMMC memory in the command line is byte address, not sector
address. That means 8 K bytes starting from the start address of eMMC memory are
erased, then the boot image C:\Image\[Link] writes to eMMC 1st Block.
• To check if the boot image is programmed successfully, the user can read the data out.
blhost –u –– read-memory 0x200 0x2000 0x121
In most cases, the user does not need to read the data out to verify if the boot image is
written successfully or not. Flashloader guarantees this when the user gets a “Success”
status for write-memory command.
If user wants to switch to other partitions of the eMMC device, they need to re-configure
the eMMC devices two times.
• Select the Boot partition 1, bus width and speed timing are kept unchanged. Fast boot
configuration is not necessary if user does not want to update it.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Offset Field
31:16 major
15:8 minor
7:0 bugfix
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
8 imageInfo 4*8 Image info is a map of 8 entries in the form below. Entries 0~
imgCopies-1 are valid. Invalid entries should be 0-filled.
Note:
• searchStride should match the one provisioned in eFuse.
• searchCount should match the one provisioned in eFuse.
It is not recommended to manually program NAND devices with the FCB and the DBBT.
The flashloader implicitly writes them into NAND during configuration.
The FCB, DBBT and firmware images will be loaded into NAND in the layout given below
(n stands for search count, m for search stride).
[Link].1
Block 0: FCB1
…
Block m: FCB2
…
Block (n-1)*m: FCBn
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
• Flashloader can generate an FCB and DBBT based on a specified SEMC NAND
configuration option block. Assuming the FCB parameters are:
– 1 copy of FCB and DBBT
– 1 copy of firmware
– Firmware intended to start at block 2, and occupy 1 block
• And parallel NAND parameters are:
– ONFI-compliant
– 8-bit wide I/O port
– CSX0 connected to NAND device’s CE port
– Device ECC applied
Below are the example steps for generating SEMC NAND configuration option block:
blhost -u -- fill-memory 0x20000000 0x4 0xd0000101 # NAND parameters
blhost -u -- fill-memory 0x20000004 0x4 0x00010101 # 1 copy of firmware, search stride
1, search step 1
blhost -u -- fill-memory 0x20000008 0x4 0x00020001 # firmware starts at block 2,
occupies 1 block
Configure the NAND flash using the option block above:
blhost -u -- configure-memory 0x100 0x20000000
Erasure, programming and readback:
blhost -u -- flash-erase-region 0x80000 0x40000 0x100 # erasure starts from block 2 (64
pp/block, 4KB/page), 1 block is erased
blhost -u -- write-memory 0x80000 [Link] 0x100
blhost -u -- read-memory 0x80400 16 0x100 # bootable image’s IVT offset should be
0x400
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
7 Security utilities
7.1 Introduction
The MCU Flashloader supports certain security utilities that can generate security related
blocks easily. See that the Flashloader itself must be signed first to enable the security
utilities correctly.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
For devices with the BEE module, it supports two encrypted regions using two unique
crypto keys. Each encrypted region can support up to 3 sub-divided FAC regions. See
the details of the image decryption and data structure required for image decryption
in System Boot Chapter in SoC’s RM. In the section, it focuses on encrypted image
generation and programming using Flashloader. Flashloader generates encrypted
images based on a simplified PRDB option block, which is defined below.
Note: The Flashloader only supports image encryption and programming for the first
encrypted region using the OTPMK/SNVS key.
4 Fac 8-24
Region Offset Field Description
info
0 Start Fac Region Start
4 Size Fac Region Size
Note:
• Tag is fixed as 0x0E.
• Key Source can be OTPMK/SNVS [255:128].
• Mode: It is recommended to use AES-CTR mode.
• FAC Region Count: Maximum allowed FAC region number is 3 (shared by encrypted
region 0 and encrypted region 1).
• Region n Protection mode: 0 – No protection, 1 – Debug disabled.
• Lock Option: Must be 0.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
7.3.1 KeyBlob
KeyBlob is a data structure that wraps the DEK for image decryption using AES-CCM
algorithm. The whole KeyBlob data structure is shown below.
AEAD 4
Offset Field Description
0 mode Fixed to 0x66,
CCM mode
1 alg Fixed to
0x55, Crypto
Algorithm:
AES
2 mac_bytes Fixed to 16
3 aad_bytes Fixed to 0
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The MCU Flashloader supports KeyBlob generation and programming using a simplified
option block called KeyBlob Option Block.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Generate KeyBlob
// Write DEK to RAM
// Program KeyBlob
Status and error codes are grouped by component. Each component that defines errors
has a group number. This expression is used to construct a status code value.
status_code = (group * 100) + code
Component group numbers are listed in this table.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
The following table lists all of the error and status codes.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Properties are the defined units of data that can be accessed with the GetProperty
or SetProperty commands. Properties may be read-only or read-write. All read-write
properties are 32-bit integers, so they can easily be carried in a command parameter. Not
all properties are available on all platforms. If a property is not available, GetProperty and
SetProperty return kStatus_UnknownProperty.
The tag values shown in the table below are used with the GetProperty and SetProperty
commands to query information about the flashloader.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
10 Revision history
This table shows the revision history of the document.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
11 Legal information
11.1 Definitions Terms and conditions of commercial sale — NXP Semiconductors
products are sold subject to the general terms and conditions of commercial
sale, as published at [Link] unless otherwise
Draft — A draft status on a document indicates that the content is still agreed in a valid written individual agreement. In case an individual
under internal review and subject to formal approval, which may result agreement is concluded only the terms and conditions of the respective
in modifications or additions. NXP Semiconductors does not give any agreement shall apply. NXP Semiconductors hereby expressly objects to
representations or warranties as to the accuracy or completeness of applying the customer’s general terms and conditions with regard to the
information included in a draft version of a document and shall have no purchase of NXP Semiconductors products by customer.
liability for the consequences of use of such information.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
11.2 Disclaimers authorization from competent authorities.
Limited warranty and liability — Information in this document is believed Suitability for use in non-automotive qualified products — Unless
to be accurate and reliable. However, NXP Semiconductors does not give this data sheet expressly states that this specific NXP Semiconductors
any representations or warranties, expressed or implied, as to the accuracy product is automotive qualified, the product is not suitable for automotive
or completeness of such information and shall have no liability for the use. It is neither qualified nor tested in accordance with automotive testing
consequences of use of such information. NXP Semiconductors takes no or application requirements. NXP Semiconductors accepts no liability for
responsibility for the content in this document if provided by an information inclusion and/or use of non-automotive qualified products in automotive
source outside of NXP Semiconductors. equipment or applications.
In no event shall NXP Semiconductors be liable for any indirect, incidental, In the event that customer uses the product for design-in and use in
punitive, special or consequential damages (including - without limitation - automotive applications to automotive specifications and standards,
lost profits, lost savings, business interruption, costs related to the removal customer (a) shall use the product without NXP Semiconductors’ warranty
or replacement of any products or rework charges) whether or not such of the product for such automotive applications, use and specifications, and
damages are based on tort (including negligence), warranty, breach of (b) whenever customer uses the product for automotive applications beyond
contract or any other legal theory. NXP Semiconductors’ specifications such use shall be solely at customer’s
own risk, and (c) customer fully indemnifies NXP Semiconductors for any
Notwithstanding any damages that customer might incur for any reason
liability, damages or failed product claims resulting from customer design and
whatsoever, NXP Semiconductors’ aggregate and cumulative liability
use of the product for automotive applications beyond NXP Semiconductors’
towards customer for the products described herein shall be limited in
standard warranty and NXP Semiconductors’ product specifications.
accordance with the Terms and conditions of commercial sale of NXP
Semiconductors.
Translations — A non-English (translated) version of a document, including
the legal information in that document, is for reference only. The English
Right to make changes — NXP Semiconductors reserves the right to
version shall prevail in case of any discrepancy between the translated and
make changes to information published in this document, including without
English versions.
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
Security — Customer understands that all NXP products may be subject to
to the publication hereof.
unidentified vulnerabilities or may support established security standards or
specifications with known limitations. Customer is responsible for the design
Suitability for use — NXP Semiconductors products are not designed,
and operation of its applications and products throughout their lifecycles
authorized or warranted to be suitable for use in life support, life-critical or
to reduce the effect of these vulnerabilities on customer’s applications
safety-critical systems or equipment, nor in applications where failure or
and products. Customer’s responsibility also extends to other open and/or
malfunction of an NXP Semiconductors product can reasonably be expected
proprietary technologies supported by NXP products for use in customer’s
to result in personal injury, death or severe property or environmental
applications. NXP accepts no liability for any vulnerability. Customer should
damage. NXP Semiconductors and its suppliers accept no liability for
regularly check security updates from NXP and follow up appropriately.
inclusion and/or use of NXP Semiconductors products in such equipment or
applications and therefore such inclusion and/or use is at the customer’s own Customer shall select products with security features that best meet rules,
risk. regulations, and standards of the intended application and make the
ultimate design decisions regarding its products and is solely responsible
for compliance with all legal, regulatory, and security related requirements
Applications — Applications that are described herein for any of these
concerning its products, regardless of any information or support that may be
products are for illustrative purposes only. NXP Semiconductors makes no
provided by NXP.
representation or warranty that such applications will be suitable for the
specified use without further testing or modification. NXP has a Product Security Incident Response Team (PSIRT) (reachable
at PSIRT@[Link]) that manages the investigation, reporting, and solution
Customers are responsible for the design and operation of their
release to security vulnerabilities of NXP products.
applications and products using NXP Semiconductors products, and NXP
Semiconductors accepts no liability for any assistance with applications or
customer product design. It is customer’s sole responsibility to determine
whether the NXP Semiconductors product is suitable and fit for the
customer’s applications and products planned, as well as for the planned
11.3 Trademarks
application and use of customer’s third party customer(s). Customers should
Notice: All referenced brands, product names, service names, and
provide appropriate design and operating safeguards to minimize the risks
trademarks are the property of their respective owners.
associated with their applications and products.
NXP Semiconductors does not accept any liability related to any default, NXP — wordmark and logo are trademarks of NXP B.V.
damage, costs or problem which is based on any weakness or default AMBA, Arm, Arm7, Arm7TDMI, Arm9, Arm11, Artisan, [Link],
in the customer’s applications or products, or the application or use by Cordio, CoreLink, CoreSight, Cortex, DesignStart, DynamIQ, Jazelle,
customer’s third party customer(s). Customer is responsible for doing all Keil, Mali, Mbed, Mbed Enabled, NEON, POP, RealView, SecurCore,
necessary testing for the customer’s applications and products using NXP Socrates, Thumb, TrustZone, ULINK, ULINK2, ULINK-ME, ULINK-PLUS,
Semiconductors products in order to avoid a default of the applications ULINKpro, μVision, Versatile — are trademarks or registered trademarks
and the products or of the application or use by customer’s third party of Arm Limited (or its subsidiaries) in the US and/or elsewhere. The related
customer(s). NXP does not accept any liability in this respect. technology may be protected by any or all of patents, copyrights, designs
and trade secrets. All rights reserved.
Airfast — is a trademark of NXP B.V.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Bluetooth — the Bluetooth wordmark and logos are registered trademarks Immersiv3D — is a trademark of NXP B.V.
owned by Bluetooth SIG, Inc. and any use of such marks by NXP I2C-bus — logo is a trademark of NXP B.V.
Semiconductors is under license.
Kinetis — is a trademark of NXP B.V.
Cadence — the Cadence logo, and the other Cadence marks found at www.
[Link]/go/trademarks are trademarks or registered trademarks of Layerscape — is a trademark of NXP B.V.
Cadence Design Systems, Inc. All rights reserved worldwide. Mantis — is a trademark of NXP B.V.
CodeWarrior — is a trademark of NXP B.V. MIFARE — is a trademark of NXP B.V.
ColdFire — is a trademark of NXP B.V. NTAG — is a trademark of NXP B.V.
ColdFire+ — is a trademark of NXP B.V. Processor Expert — is a trademark of NXP B.V.
EdgeLock — is a trademark of NXP B.V. QorIQ — is a trademark of NXP B.V.
EdgeScale — is a trademark of NXP B.V. SafeAssure — is a trademark of NXP B.V.
EdgeVerse — is a trademark of NXP B.V. SafeAssure — logo is a trademark of NXP B.V.
elQ — is a trademark of NXP B.V. Synopsys — Portions Copyright © 2021 Synopsys, Inc. Used with
FeliCa — is a trademark of Sony Corporation. permission. All rights reserved.
Freescale — is a trademark of NXP B.V. Tower — is a trademark of NXP B.V.
HITAG — is a trademark of NXP B.V. UCODE — is a trademark of NXP B.V.
ICODE and I-CODE — are trademarks of NXP B.V. VortiQa — is a trademark of NXP B.V.
MCUFLSHLDRRM All information provided in this document is subject to legal disclaimers. © 2022 NXP B.V. All rights reserved.
Contents
1 Introduction ......................................................... 2 [Link] Programming Serial NOR Flash device
1.1 Overview ............................................................ 2 using FlexSPI NOR configuration option
1.2 Terminology ........................................................2 block .................................................................45
1.3 Block diagram ....................................................2 [Link] Select the FLEXSPI instance .......................... 45
1.4 Features supported ............................................3 [Link] FlexSPI Instance Selection using FlexSPI
1.5 Components supported ..................................... 3 NOR configuration option block ....................... 46
2 MCU Flashloader protocol API .......................... 5 6.2.3 FlexSPI NOR on-chip OTFAD pre-
2.1 Introduction ........................................................ 5 encryption option block ....................................46
2.2 Command with no data phase ...........................5 [Link] On-chip pre-encryption using the option
2.3 Command with incoming data phase .................6 block .................................................................47
2.4 Command with outgoing data phase ................. 7 6.3 Serial NAND Flash through FlexSPI ................48
3 Flashloader packet types ................................... 9 6.3.1 FlexSPI NAND Firmware configuration
3.1 Introduction ........................................................ 9 block (FCB) ......................................................48
3.2 Framing packet ..................................................9 6.3.2 FlexSPI NAND configuration block .................. 49
3.3 CRC16 algorithm ............................................. 10 6.3.3 FlexSPI NAND FCB option block .................... 51
3.4 Ping packet ......................................................11 6.3.4 FlexSPI NAND configuration option block ........52
3.5 Ping response packet ...................................... 12 6.3.5 Example usage with Flashloader .....................53
3.6 Command packet ............................................ 12 6.4 SD/eMMC through uSDHC ..............................54
3.7 Response packet ............................................. 14 6.4.1 SD configuration block .....................................54
4 MCU Flashloader command API ......................15 6.4.2 Example usage with Flashloader .....................55
4.1 Introduction ...................................................... 15 6.4.3 eMMC configuration block ............................... 56
4.2 GetProperty command .....................................16 6.4.4 Example usage with Flashloader .....................59
4.3 SetProperty command ..................................... 17 6.5 Parallel NAND Flash through SEMC ............... 60
4.4 FlashEraseAll command ..................................19 6.5.1 SEMC NAND Firmware configuration block .....60
4.5 FlashEraseRegion command ...........................20 6.5.2 SEMC NAND configuration block .................... 61
4.6 ReadMemory command .................................. 21 6.5.3 SEMC NAND configuration option block ..........66
4.7 WriteMemory command ...................................23 6.5.4 Example usage with Flashloader .....................68
4.8 FillMemory command ...................................... 25 [Link] FCB/DBBT management ................................. 68
4.9 Execute command ........................................... 26 [Link] Example configuration ..................................... 69
4.10 Call command ..................................................27 6.6 1-bit SPI EEPROM/NOR Flash through
4.11 Reset command .............................................. 28 LPSPI ...............................................................69
4.12 FlashProgramOnce/eFuseProgramOnce 6.6.1 SPI EEPROM/NOR configuration option
command ......................................................... 29 block .................................................................70
4.13 FlashReadOnce/eFuseReadOnce 6.6.2 Example usage with Flashloader .....................72
command ......................................................... 30 7 Security utilities ................................................ 72
4.14 Configure Memory command .......................... 31 7.1 Introduction ...................................................... 72
4.15 ReceiveSBFile command ................................ 32 7.2 Image encryption and programming ................ 73
4.16 GenerateKeyBlob command ............................32 7.2.1 Example to generate encrypted image and
5 Supported peripherals ......................................34 program to Flash ............................................. 73
5.1 Introduction ...................................................... 34 7.3 KeyBlob generation and programming ............ 74
5.2 UART peripheral .............................................. 34 7.3.1 KeyBlob ............................................................74
5.3 USB HID peripheral ......................................... 35 7.3.2 KeyBlob Option Block ......................................75
5.3.1 Device descriptor ............................................. 35 7.3.3 Example to generate and program KeyBlob .... 77
5.3.2 Endpoints ......................................................... 36 8 Status and error codes .....................................77
5.3.3 HID reports ...................................................... 36 9 GetProperty and SetProperty commands ....... 81
6 External memory support ................................ 37 10 Revision history ................................................ 83
6.1 Introduction ...................................................... 37 11 Legal information .............................................. 85
6.2 Serial NOR Flash through FlexSPI .................. 38
6.2.1 FlexSPI NOR configuration block .................... 38
6.2.2 FlexSPI NOR configuration option block ..........43
[Link] Typical use cases for FlexSPI NOR
configuration block ...........................................45
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section 'Legal information'.