Si4010-C2
76
Rev. 1.0
24.8. Boot Status Variables
End of the CODE/XDATA RAM are reserved for boot status variables.
The user must pay attention to the content of the
wBoot_DpramTrimBeg
variable. Its content points to the
first reserved address for
Factory
Silicon Labs use.
Important:
The CODE/XDATA area from this address on (increasing address) is reserved and must not be
overwritten by
User
NVM load at boot time nor by user application at runtime.
If this area is accidentally overwritten by user application the chip will behave unpredictably. There is no
hardware protection for this region.
Note that depending on the revision of the chip the
Factory
XDATA area can vary in size. The area is
refreshed when reset is issued.
Boot status byte can or should be read by the user application at the very beginning to determine whether
the copying of the
Factory
and
User
data from NVM to desired RAM destination was successful or not.
When there are no errors, the value the
bBoot_BootStat
variable should be 0x00 or 0x80. Any other value
denotes a boot error. The user application then can decide whether to run or stall, if the user application
was actually loaded to RAM. If the boot fails and the user application is not loaded to RAM, then
unpredictable results may occur. The bit 7 of this variable contains a read value of GPIO[0] at the very
beginning of the boot before the XO was optionally turned on.
Table 24.1. Boot XDATA Status Variables
Register
Addr
Type
Description
wBoot_DpramTrimBeg
0x11F3
WORD*
Address of the first occupied byte by the Silicon Labs
factory data in CODE/XDATA RAM. This variable is set
after the boot. User must read the variable to determine
where is the end of the usable CODE/XDATA RAM mem-
ory for user’s use. The address is stored in big endian
fashion; address MSB byte at the variable address loca-
tion, followed by LSB byte on the next (a 1) loca-
tion.
wBoot_NvmUserBeg
0x11F5
WORD
Byte address of the first byte of the User load in the NVM
memory. It is set by the Factory load. The User load MUST
start at that address in NVM. Boot routine reads this vari-
able before loading the User code after it finished loading
the Factory load.
wBoot_NvmCopyAddr
0x11FD
WORD
First unread data address in NVM by the NVM copy routine
bNvm_CopyBlock
. After the boot is done this variable
contains, in big endian, the NVM address of the first NVM
byte not read by NVM copy routine. This is the first “empty”
byte in NVM which is available for new data.
The value of this variable is essential when the user wants
to add more data to NVM later on.
bBoot_BootStat
0x11FF
BYTE
Boot status. User program can read this byte and decide
whether the boot finished correctly. If not, then it can blink
LED or not to continue with running the code. See the
bBoot_BootStat
bit description table.
*Note:
WORD is an unsigned 16 bit value, BYTE is an unsigned 8 bit value.