Rev. 1.0
77
Si4010-C2
XDATA Address = 0x11FF
Apart from the CODE/XDATA RAM memory region there is a boot control and status SFR register,
BOOT_FLAGS. It controls the end of the boot and has error status bit, which is set when
bBoot_BootStat
variable has other than 0x00 value. That is added for convenience so the user code can just check a single
bit in SFR register rather than reading XDATA variable to determine whether boot finished successfully or
not. If the
bBoot_BootStat
XDATA variable is not 0x00, the boot fail flag is set in the BOOT_FLAGS SFR.
The other bits control whether the user code will run after the boot. If the debugging chain is used and user
code is loaded through IDE, this process is transparent to the user. Whenever the IDE connects to the
device, it resets and halts the device, awaiting user. The user will generally not write to the
BOOT_FLAGS
register.
However, if the user wants to make the
User
part to behave as a
Factory
part, then it is possible to write
value 0x20 to the BOOT_FLAGS register through IDE (see View -> Debug Windows -> SFR -> Boot
window). Don’t forget to press the
Refresh
IDE button for the change to take effect. Then until the power
to the part is cycled the part would behave as a
Factory
part.
XDATA Variable Definition 24.1. bBoot_BootStat
Bit
7
6
5
4
3
2
1
0
Name
BS_GPIO_
XTAL
RESERVED
BS_ERR_FACTORY[2:0]
BS_ERR_
USER_
NEXT
BS_ERR_
USER_
FIRST
Type
R
R
R
R
R
R
Reset
0/1
0
0
0
0
0
0
0
Bit
Name
Function
7
BS_GPIO_
XTAL
GPIO0 Read before Boot.
Read GPIO0 value at the very beginning of the boot prior to optionally turning on the XO
(crystal oscillator).
6:5
Reserved
Reserved.
4:2
BS_ERR_
FACTORY
[2:0]
Load of the Factory Data.
Load of the Factory data failed if value is other than 0x0
1
BS_ERR_
USER_
NEXT
Load of the Second or Subsequent User block.
Load of the second or subsequent user block failed if other than 0.
0
BS_ERR_
USER_
FIRST
Load of the First User block.
Load of the first user block failed if other than 0.