Rev. 1.00
134
September 11, 2018
Rev. 1.00
135
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
SPI Data Register
The SIMD register is used to store the data being transmitted and received. The same register is used
by both the SPI and I
2
C functions. Before the device writes data to the SPI bus, the actual data to
be transmitted must be placed in the SIMD register. After the data is received from the SPI bus, the
device can read it from the SIMD register. Any transmission or reception of data from the SPI bus
must be made via the SIMD register.
• SIMD Register
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
x
x
x
x
x
x
x
x
"x": unknown
Bit 7~0
D7~D0
: SIM data register bit 7 ~ bit 0
SPI Control Registers
There are also two control registers for the SPI interface, SIMC0 and SIMC2. Note that the SIMC2
register also has the name SIMA which is used by the I
2
C function. The SIMC0
r
egister is used to
control the enable/disable function and to set the data transmission clock frequency.
The SIMC2
r
egister is used for other control functions such as LSB/MSB selection, write collision flag etc.
• SIMC0 Register
Bit
7
6
5
4
3
2
1
0
Name
SIM2
SIM1
SIM0
—
SIMDEB1 SIMDEB0 SIMEN
SIMICF
R/W
R/W
R/W
R/W
—
R/W
R/W
R/W
R/W
POR
1
1
1
—
0
0
0
0
Bit 7~5
SIM2~SIM0
: SIM operating
mode c
ontrol
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
SUB
100: SPI master mode; SPI clock is PTM CCRP match frequency/2
101: SPI slave mode
110: I
2
C slave mode
111:
Unused mode
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 PTM and f
SUB
. If the SPI Slave Mode is selected
then the clock will be supplied by an external Master device.
Bit 4
Unimplemented, read as "0"
Bit 3~2
SIMDEB1~SIMDEB0
: I
2
C debounce
t
ime selection
These bits are only available when the SIM is configured to operate in the I
2
C mode.
Refer to the I
2
C register section.