
DocID13284 Rev 2
311/564
UM0404
The bootstrap loader
Other than after a normal reset the watchdog timer is disabled, so the bootstrap loading
sequence is not time limited. Pin TxD0 is configured as output, so the ST10F276 can return
the acknowledge byte. Even if the internal IFLASH is enabled, no code can be executed out
of it.
15.3.4
Loading the start-up code
After sending the acknowledge byte the BSL enters a loop to receive 32 bytes via ASC0.
These bytes are stored sequentially into locations 00’FA40
H
through 00’FA5F
H
of the IRAM.
So up to 16 instructions may be placed into the RAM area. To execute the loaded code the
BSL then jumps to location 00’FA40
H
, that is, the first loaded instruction. The bootstrap
loading sequence is now terminated, the ST10F276 remains in BSL mode, however. Most
probably the initially loaded routine will load additional code or data, as an average
application is likely to require substantially more than 16 instructions. This second receive
loop may directly use the pre-initialized interface ASC0 to receive data and store it to
arbitrary user-defined locations.
This second level of loaded code may be the final application code. It may also be another,
more sophisticated, loader routine that adds a transmission protocol to enhance the integrity
of the loaded code or data. It may also contain a code sequence to change the system
configuration and enable the bus interface to store the received data into external memory.
This process may go through several iterations or may directly execute the final application.
In all cases the ST10F276 will still run in BSL mode, that is, with the watchdog timer
disabled and limited access to the internal Flash area. All code fetches from the internal
IFLASH area (01’0000
H
...08’FFFF
H
) are redirected to the special Test-Flash. Data read
operations will access the internal Flash of the ST10F276, if any is available, but will return
undefined data on ROM-less devices.
Watchdog Timer:
Disabled
Register SYSCON:
0400
H
(1)
Context Pointer CP:
FA00
H
Register STKUN:
FA00
H
Stack Pointer SP:
FA40
H
Register STKOV:
FC00
H
Register BUSCON0:
according to startup configuration
(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.
Register S0CON:
8011
H
Register BUSCON0:
according to startup configuration
(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 S0BG:
according to ‘00’ byte
P3.10 / TXD0:
note
DP3.10: