
The bootstrap loader
UM0404
DocID13284 Rev 2
15.6.7
Alternate boot user software
If the rules described here before are met (that is,: mapping of variables, disabling of
interrupts, exit conditions, predefined vectors in Block 0 of Bank 2, Watchdog usage) then
users can write the software they want to execute in this mode starting from 09’0000h.
15.6.8
User/alternate mode signature integrity check
The behavior of the Alternate Boot Mode is based on the computing of a signature between
the content of two memory locations and a comparison with a reference signature. This
requires that users who use Alternate Boot have reserved and programmed the Flash
memory locations according to:
User mode signature
00'0000h: memory address of
operand0
for the signature computing
00’1FFCh: memory address of
operand1
for the signature computing
00’1FFEh: memory address for the signature reference
Alternate mode signature
09'0000h: memory address of
operand0
for the signature computing
09’1FFCh: memory address of
operand1
for the signature computing
09’1FFEh: memory address for the signature reference
The value for
operand0, operand1
and the signature should be such that the following
sequence should be successfully executed:
MOV
Rx, CheckBlock1Addr; 00’0000h for standard reset
ADD
Rx, CheckBlock2Addr; 00’1FFCh for standard reset
CPLB
RLx
; 1s complement of the lower
; byte of the sum
CMP
Rx, CheckBlock3Addr; 00’1FFEh for standard reset
15.6.9 Alternate
boot
user software aspects
User defined alternate boot code must start at 09’0000h. A new SFR has been created on
ST10F276 to indicate that the device is running in Alternate Boot Mode: bit 5 of EMUCON
(mapped at 0xFE0Ah) is set when the alternate boot is selected by the reset configuration.
All the other bits should be ignored when checking the content of this register to read the
value of bit5.
This bit is a read only bit. It remains set until next software or hardware reset.
15.6.10 EMUCON
register
EMUCON (FE0Ah / 05h)
SFR
Reset Value: - - xxh
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
-
ABM
-
R
-