Rev. 1.10
100
November 04, 2019
Rev. 1.10
101
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
a single SCS pin only one slave device can be utilized. The SCS pin is controlled by software, set
CSEN bit to 1 to enable SCS pin function, set CSEN bit to 0 the SCS pin will be floating state.
SCK
SPI Master
SDO
SDI
SCS
SCK
SPI Slave
SDI
SDO
SCS
SPI Master/Slave Connection
The SPI function in the device offers the following features:
•
Full duplex synchronous data transfer
•
Both Master and Slave modes
•
LSB first or MSB first data transmission modes
•
Transmission complete flag
•
Rising or falling active clock edge
The status of the SPI interface pins is determined by a number of factors such as whether the device is
in the master or slave mode and upon the condition of certain control bits such as CSEN and SIMEN.
SIMD
TX/RX Shift Register
SDI Pin
Clock
Edge/Polarity
Control
CKEG
CKPOLB
Clock
Source
Select
f
SYS
f
SUB
CTM CCRP match frequency/2
SCK Pin
CSEN
Busy
Status
SDO Pin
SCS Pin
Data Bus
WCOL
TRF
SIMICF
SPI Block Diagram
SPI Registers
There are three internal registers which control the overall operation of the SPI interface. These are
the SIMD data register and two control registers, SIMC0 and SIMC2. Note that the SIMC2 and
SIMD registers and their POR values are only available when the SPI mode is selected by properly
configuring the UMD and SIM2~SIM0 bits in the SIMC0 register.
Register
Name
Bit
7
6
5
4
3
2
1
0
SIMC0
SIM2
SIM1
SIM0
UMD
SIMDEB1 SIMDEB0 SIMEN
SIMICF
SIMC2
D7
D6
CKPOLB
CKEG
MLS
CSEN
WCOL
TRF
SIMD
D7
D6
D5
D4
D3
D2
D1
D0
SPI Register List