beautypg.com

Nvoking the, Ootstrap, Oader on – Maxim Integrated Secure Microcontroller User Manual

Page 138: Ds5000, Eries, Evices, Ds5001/ds5002

background image

Secure Microcontroller User’s Guide

138 of 187

The guaranteed preserved locations are areas in scratchpad RAM that will not be changed by the
bootstrap loader. These locations as useful for storing data such as serial numbers, which should be
retained regardless of the software. Similarly, the guaranteed destroyed locations have all been
overwritten during bootstrap loader execution with indeterminate data. These locations can be used to
store security-sensitive data, because it is erased by the loader before another program can read it out.

The indeterminate area contains various stacks and buffers used by the loader, and a given byte in this
area may or may not be modified by the loader. As such the user should not rely on the bootstrap loader
preserving any data in this area. In a like manner, because not all locations are used, the indeterminate
area of scratchpad RAM should not be used for storing security sensitive data.

16.2 Invoking the Bootstrap Loader on DS5000 Series Devices

The DS5000 is placed in its Program Load configuration by simultaneously applying a logic 1 to the RST
pin and forcing the

PSEN

pin to a logic 0 level. Immediately following this action, the DS5000 will look

for a serial ASCII carriage return (0DH) character received at 57,600, 19,200, 9600, 2400, 1200, or 300
bps over the serial port or a parallel program load pulse. For whichever type is first detected, the DS5000
will place itself in the associated Program Load mode. If an ASCII character is detected first, then
the DS5000 will place itself in the serial program load mode and will ignore any parallel program strobe
pulses. Conversely, if a parallel program strobe pulse is first detected, then the DS5000 will be placed in
the parallel program load mode and all incoming data on the serial port will be ignored. The selected
program load mode will remain in effect until the next time power is removed from the device or when
the program load configuration (RST = 1,

PSEN

= 0) is removed. The methods for invoking serial and

parallel modes were chosen to eliminate the possibility of accidentally invoking the opposite mode during
loading.

If the program load configuration is removed such that RST = 0 and

PSEN

= 1 with power still applied at

V

CC

, the device undergoes an internal hardware reset and will begin executing code from the reset vector

at 0000h in Program Memory.

16.3 Invoking the Bootstrap Loader on DS5001/DS5002 Series Devices

The DS5001 and DS5002 microcontrollers use an identical method to invoke the bootstrap loader. A
falling edge on the

PROG

pin will invoke the loader with a single device pin. Note that the

PROG

pin

must remain low for 48 oscillator clocks to be certain of recognition. Taking the

PROG

pin to a logic 1

will remove the loader and cause the DS5001 to perform a reset. Note also that the

PROG

pin must be

high for as much as 48 clocks before the CPU is guaranteed to exit the loader. This constitutes the
“pseudo-edge” detection of the program pin. Note also that pulling RST = 1 and

PSEN

= 0 will also cause

the loader to be invoked.

Once the loader mode stimulus has been detected, the microprocessor waits for an ASCII carriage return
(0Dh) characteristic on either the serial port or the RPC (8042) port. For serial reception, the loader will
auto-baud at 57600, 19200, 9600, 2400, 1200 and 300 bps. For RPC mode, the 0Dh value must be written
into the Data In buffer as described in the RPC section under Parallel I/O. When either of these conditions
is detected, the loader will place itself in that loader mode. Activity on the other port will be ignored. This
condition will remain until the loader is exited or power is cycled. When the loader stimulus is removed,
the processor will perform a hardware reset and begin execution at location 0000h.