
• The MMCAU information structure and the actual MMCAU functions do not need to
be in contiguous memory.
• A ready-to-use library contains these functions, but this library needs to be rebuilt to
be compatible with the prototypes above. Specifically, the rcon variable needs to be
passed into the functions, to make the code relocatable.
After an encrypted SB file starts to be received by the bootloader, the information for
setting up the MMCAU is retrieved and the decryption process begins.
• If the information is incorrect or if the functions do not meet the above requirements,
then the bootloader can become unresponsive, so be sure that everything is correctly
implemented as above.
• If there is a recoverable error, then the bootloader will return a relevant error code.
If everything is operating properly, then the exact same response will be received as
though the bootloader was receiving an unencrypted file via the ReceiveSbFile command.
14.7 Verifying the application in flash using CRC-32
Using CRC-32 and a given address range, the ROM bootloader supports performing an
application integrity check.
Before application integrity testing: the following fields in the bootloader configuration
area must be set:
• Set crcStartAddress to the start address that should be used for the CRC check.
• Set crcByteCount to the number of bytes to run the CRC check on, from the start
address.
• Set crcExpectedValue to the value that the CRC calculation should result in.
Application integrity testing:
• If all of the above fields are unset (all 0xFF bytes for crcStartAddress, crcByteCount,
and crcExpectedValue), then the ROM bootloader returns
kStatus_AppCrcCheckInvalid.
• If any one of the above fields are set (crcStartAddress, crcByteCount, and
crcExpectedValue), then the ROM bootloader checks if the given address range of
the application is valid, and if the application resides in internal flash or external
QSPI flash, by running a CRC check on the image in flash:
• If the the given address range of the application is not valid (false), then the
bootloader returns kStatus_AppCrcCheckOutOfRange.
• If the given address range of the application is valid (true), then the CRC check
is performed. The CRC32 algorithm in ROM uses a polynomial
(0x04C1_1DB7), and the initial seed is 0xFFFF_FFFF.
Verifying the application in flash using CRC-32
K32 L2A Reference Manual, Rev. 2, 01/2020
318
NXP Semiconductors
Summary of Contents for K32 L2A Series
Page 2: ...K32 L2A Reference Manual Rev 2 01 2020 2 NXP Semiconductors...
Page 42: ...K32 L2A Reference Manual Rev 2 01 2020 42 NXP Semiconductors...
Page 122: ...Flash Memory Clock K32 L2A Reference Manual Rev 2 01 2020 122 NXP Semiconductors...
Page 158: ...Debug and security K32 L2A Reference Manual Rev 2 01 2020 158 NXP Semiconductors...
Page 174: ...Module Signal Description Tables K32 L2A Reference Manual Rev 2 01 2020 174 NXP Semiconductors...
Page 246: ...Application information K32 L2A Reference Manual Rev 2 01 2020 246 NXP Semiconductors...
Page 374: ...CMP Trigger Mode K32 L2A Reference Manual Rev 2 01 2020 374 NXP Semiconductors...
Page 384: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 384 NXP Semiconductors...
Page 592: ...Application Information K32 L2A Reference Manual Rev 2 01 2020 592 NXP Semiconductors...
Page 656: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 656 NXP Semiconductors...
Page 664: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 664 NXP Semiconductors...
Page 744: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 744 NXP Semiconductors...
Page 762: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 762 NXP Semiconductors...
Page 806: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 806 NXP Semiconductors...
Page 868: ...Integer square root K32 L2A Reference Manual Rev 2 01 2020 868 NXP Semiconductors...
Page 976: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 976 NXP Semiconductors...
Page 1012: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1012 NXP Semiconductors...
Page 1094: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1094 NXP Semiconductors...
Page 1132: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1132 NXP Semiconductors...
Page 1182: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1182 NXP Semiconductors...
Page 1290: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1290 NXP Semiconductors...