Rev. 1.10
110
November 04, 2019
Rev. 1.10
111
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
• SIMA Register
Bit
7
6
5
4
3
2
1
0
Name
SIMA6
SIMA5
SIMA4
SIMA3
SIMA2
SIMA1
SIMA0
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~1
SIMA6~SIMA0
: I
2
C slave address
SIMA6~SIMA0 is the I
2
C slave address bit 6 ~ bit 0.
Bit 0
D0
: Reserved bit, can be read or written
I
2
C Control Registers
There are three control registers for the I
2
C interface, SIMC0, SIMC1 and SIMTOC. The SIMC0
register is used to control the enable/disable function and to set the data transmission clock
frequency. The SIMC1 register contains the relevant flags which are used to indicate the I
2
C
communication status. Another register, SIMTOC, is used to control the I
2
C time-out function and is
described in the corresponding section.
• SIMC0 Register
Bit
7
6
5
4
3
2
1
0
Name
SIM2
SIM1
SIM0
UMD
SIMDEB1 SIMDEB0 SIMEN
SIMICF
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
1
1
1
0
0
0
0
0
Bit 7~5
SIM2~SIM0
: USIM SPI/I
2
C 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
SUB
100: SPI master mode; SPI clock is CTM CCRP match frequency/2
101: SPI slave mode
110: I
2
C slave mode
111: Unused mode
When the UMD bit is cleared to zero, these bits setup the SPI or I
2
C operating mode
of the USIM 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
CTM and f
SUB
. If the SPI Slave Mode is selected then the clock will be supplied by an
external Master device.
Bit 4
UMD
: UART mode selection bit
0: SPI or I
2
C mode
1: UART mode
This bit is used to select the UART mode. When this bit is cleared to zero, the actual
SPI or I
2
C mode can be selected using the SIM2~SIM0 bits. Note that the UMD bit
must be set low for SPI or I
2
C mode.
Bit 3~2
SIMDEB1~SIMDEB0
: I
2
C Debounce Time Selection
00: No debounce
01: 2 system clock debounce
1x: 4 system clock debounce
These bits are used to select the I
2
C debounce time when the USIM is configured as
the I
2
C interface function by setting the UMD bit to “0” and the SIM2~SIM0 bits to
“110”.