Maxim Integrated Secure Microcontroller User Manual

Page 72

Advertising
background image

Secure Microcontroller User’s Guide

72 of 187

This function is supported in the CRC register, accessible via the Bootstrap Loader. Setting the CRC bit
(LSB) enables the power-up CRC function. The upper nibble of the CRC register (values 0h–Fh) defines
the address space in 4kB blocks over which the CRC calculation is performed. For example, if the nibble
is set to 0001b, the CRC range is from 0000 to 0FFFh. Once the LSB of the CRC register is set, the
loader “I” command will cause the CRC of the specified block to be computed. The result is
automatically stored in the last two bytes of the specified block. These bytes should not be used by the
application. This computation will be correct provided that the CRC range is less than or equal to the
partition if PM = 0. If PM = 1, using 32kB RAMs, the CRC range must be less than or equal to the
program range.

If CRC is enabled, the DS5001FP will automatically invoke the Bootstrap Loader on either power-up or a
Watchdog timeout and the CRC check will be performed. If an error is detected, the Bootstrap Loader
will wait for reloading. If there is no error, the application will begin at address 0000h following a reset.
Automatic checking of the CRC can be disabled by writing a 0 to the CRC register LSB. As mentioned
above, this is done using the “W” command in loader mode. The CRC hardware uses registers 0C3h and
0C2h for most and least significant byte intermediate storage.

DS5001 CRC REGISTER (Address 0C1h)

RNGE3

RNGE2

RNGE1

RNGE0

MDM

CRC

CRC.7-4

RANGE 3–0

Determines the range over which a power-up CRC will be performed. Addresses
are specified on 4kB boundaries.

Initialization:

Reset to 0 on a no-V

LI

reset.

Read Access:

Can be read at any time.

Write Access:

Cannot be written by application software. Can be written by bootstrap loader.


CRC.1

MDM

When set to 1, the bootstrap loader attempts to use a modem (UART) on PE4 if
CRC is incorrect. This feature is no longer useful following the obsoletion of the
corresponding modem devices.

Initialization:

Reset to 0 on a no-V

LI

reset.

Read Access:

Can be read at any time.

Write Access:

Cannot be written by application software. Can be written by bootstrap loader.


CRC.0

CRC

When set to 1, a CRC check is performed on power-up or watchdog timeout. CRC
is checked against stored values. An error initiates program load mode. This bit is
not present in the DS5002, as the device does not support the power-on CRC
function.

Initialization:

Reset to 0 on a no-V

LI

reset.

Read Access:

Can be read at any time.

Write Access:

Cannot be written by application software. Can be written by bootstrap loader.



As mentioned, the CRC-16 hardware is available to the application software. Although a CRC could be
computed completely in software, the process is much faster if the DS5001/DS5002 CRC-16 hardware is
used. This feature can perform a CRC-16 on 64kB of memory in approximately 500ms. In addition, the
CRC-16 is a superior method of checking the file validity compared to a checksum.

Advertising