SIMC0 Register
Bit
7
6
5
4
3
2
1
0
Name
SIM2
SIM1
SIM0
¾
¾
¾
SIMEN
¾
R/W
R/W
R/W
R/W
¾
¾
¾
R/W
¾
POR
1
1
1
¾
¾
¾
0
¾
Bit 7~5
SIM2, SIM1, SIM0
: SIM Operating Mode Control
000: SPI master mode; SPI clock is f
SYS
/4
001: SPI master mode; SPI clock is f
SYS
/16
010: SPI master mode; SPI clock is f
SYS
/64
011: SPI master mode; SPI clock is f
LIRC
100: Unused
101: SPI slave mode
110: I
2
C slave mode
111: Unused
These bits setup the overall operating mode of the SIM function. As well as selecting if the I
2
C
or SPI function, they are used to control the SPI Master/Slave selection and the SPI Master clock
frequency. The SPI clock is a function of the system clock but can also be chosen to be sourced
from the TM0. If the SPI Slave Mode is selected then the clock will be supplied by an external
Master device.
Bit 4~2
unimplemented, read as
²
0
²
Bit 1
SIMEN
: SIM Control
0: disable
1: enable
The bit is the overall on/off control for the SIM interface. When the SIMEN bit is cleared, the SDI,
SDO, SCK and SCS, or SDA and SCL lines will be as I/O function and the SIM operating
current will be reduced to a minimum value. When the bit is high the SIM interface is enabled.
If the SIM is configured to operate as an SPI interface via the SIM2~SIM0 bits, the contents of the
SPI control registers will remain at the previous settings when the SIMEN bit changes from low
to high and should therefore be first initialised by the application program. If the SIM is configured
to operate as an I
2
C interface via the SIM2~SIM0 bits and the SIMEN bit changes from low to
high, the contents of the I
2
C control bits such as HTX and TXAK will remain at the previous
settings and should therefore be first initialised by the application program while the relevant I
2
C
flags such as HCF, HAAS, HBB, SRW and RXAK will be set to their default states.
Bit 0
unimplemented, read as
²
0
²
BS83B08-3/B12-3/B16-3/B16G-3/C24-3
8-Bit Touch Key Flash MCU
Rev. 1.50
89
April 28, 2020