
DocID13284 Rev 2
321/564
UM0404
The bootstrap loader
15.6.4
ST10 configuration in alternate boot mode
When the ST10F276 has entered BSL mode via CAN, the following configuration is
automatically set (values that deviate from the normal reset values, are
marked in bold
):
Even if the internal IFlash is enabled, no code can be executed out of it.
Note:
As the XFlash is needed, XPERCON register is configured by the ABM loader code and bit
XPEN of SYSCON is set. Anyway, as long as the EINIT instruction is not executed (and it is
not in the bootstrap loader code), the settings can be modified. The following steps must be
performed in order to do this:
1.
Copy in DPRAM a function that will do the following steps:
a)
Disable the XPeripherals by clearing XPEN in SYSCON register
b)
enabled the needed XPeripherals by writing the correct value in XPERCON
register
c)
set XPEN bit in SYSCON
d)
return to calling address
2.
Call the function from XFlash
The changing of XPERCON value cannot be executed from the XFlash because the XFlash
will be disabled by the clearing of XPEN bit in SYSCON.
15.6.5 Watchdog
As for standard boot, the Watchdog timer should remain disabled during Alternate Boot
Mode. In case of a Watchdog reset occurs, a software reset will be generated.
Note:
Section 15.2.7: Exiting bootstrap loader mode
15.6.6 Exiting
alternate boot mode
Once the ABM mode is entered, it can be exited only with a software or hardware reset.
Note:
Section 15.2.7: Exiting bootstrap loader mode
Watchdog Timer:
Disabled
Register SYSCON:
0404
H
(1)
1.
In Bootstrap modes (standard or alternate) ROMEN, bit 10 of SYSCON, is always set regardless of EA pin
level. BYTDIS, bit 9 of SYSCON, is set according to data bus width selection via Port0 configuration.
; XPEN bit set
Context Pointer CP:
FA00
H
Register STKUN:
FA00
H
Stack Pointer SP:
FA40
H
Register STKOV:
FC00
H
Register BUSCON0:
acc. to start-up config.
(2)
2.
BUSCON0 is initialized with 0000h, external bus disabled, if pin EA is high during reset. If pin EA is low
during reset, BUSACT0, bit 10, and ALECTL0, bit 9, are set enabling the external bus with lengthened ALE
signal. BTYP field, bit 7 and 6, is set according to Port0 configuration.
Register XPERCON:
002D
H
; XRAM1, XRAM2, CAN1 and XFlash
enabled