
Rev. 1.00
419 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
19 Inter-Integrated Circuit (I2C)
I
2
C Timeout Register – I2CTOUT
This register specifies the I
2
C Timeout counter preload value and clock prescaler ratio.
Offset:
0x028
Reset value: 0x0000_0000
31
30
29
28
27
26
25
24
Reserved
Type/Reset
23
22
21
20
19
18
17
16
Reserved
PSC
Type/Reset
RW 0 RW 0 RW 0
15
14
13
12
11
10
9
8
TOUT
Type/Reset RW 0 RW 0 RW 0 RW 0 RW 0 RW 0 RW 0 RW 0
7
6
5
4
3
2
1
0
TOUT
Type/Reset RW 0 RW 0 RW 0 RW 0 RW 0 RW 0 RW 0 RW 0
Bits
Field
Descriptions
[18:16]
PSC
I
2
C Timeout Counter Prescaler Selection
This PSC
field is used to specify the I
2
C timeout counter clock frequency, f
I2CTO
. The
timeout clock frequency is obtained using the formula.
f
I2CTO
= f
PCLK
2
PSC
PSC = 0 → f
I2CTO
= f
PCLK
/ 2
0
= f
PCLK
PSC = 1 → f
I2CTO
= f
PCLK
/ 2
1
= f
PCLK
/ 2
PSC = 2 → f
I2CTO
= f
PCLK
/ 2
2
= f
PCLK
/ 4
…
PSC = 7 → f
I2CTO
= f
PCLK
/ 2
7
= f
PCLK
/ 128
[15:0]
TOUT
I
2
C Timeout Counter Preload Value
The TOUT field is used to define the counter preloaded value
The counter value is reloaded when any of the following conditions occurs:
1. The RXBF, TXDE, RXDNE, RXNACK, GCS or ADRS flag in the I2CSR register
is asserted.
2. The I
2
C master module sends a START signal.
3. The I
2
C slave module detects a START signal.
The counter stops counting when any of the following conditions occurs:
1. The I
2
C slave device is not addressed.
2. The I
2
C master module sends a STOP signal.
3. The I
2
C slave module detects a STOP signal.
4. The ARBLOS or BUSERR flag in the I2CSR register is asserted.