
M0A21/M0A23 Series
May 06, 2022
Page
579
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
STARIF = 1
(PTRG, STA, STO, AA)=(1, 1, 0, x)
Writing 1 to ACKIF
Sr
TXDAT
(SLA+R)
ACK
RXDAT
(Data)
RXDAT
(Data)
P
P
ACKIF = 1
NACKIF = 1
STARIF = 1
STORIF = 1
STARIF = 1
ACKIF = 1
NACKIF = 1
(PTRG, STA, STO, AA)=(1, 0, 0, 1)
Writing 1 to ACKIF
(PTRG, STA, STO, AA)=(1, 0, 0, 0)
Writing 1 to ACKIF
(PTRG, STA, STO, AA)=(1, 1, 1, x)
Writing 1 to NACKIF
(PTRG, STA, STO, AA)=(1, 0, 1, x)
Writing 1 to NACKIF
(PTRG, STA, STO, AA)=(1, 1, 0, x)
Writing 1 to NACKIF
STARIF = 1
(RTRG, STA, STO, AA)=(0, 1, 0, x)
Clear protocol status register
Master to Slave
Master to Slave
Slave to Master
Slave to Master
Arbitration Lost
Arbitration Lost
RXDAT
(Data)
(PTRG, STA, STO, AA)=(1, 0, 0, 0)
Writing 1 to ACKIF
ARBLOIF = 1
TXDAT
(SLA+R)
TXDAT = SLA+R
(PTRG, STA, STO, AA)=(1, 0, 0, X)
ARBLOIF = 1
(PTRG, STA, STO, AA)=(1, 0, 0, X)
Writing 1 to ARBLOIF
...
I
2
C bus will be release;
Not addressed SLV mode will be enterd
...
(PTRG, STA, STO, AA)=(1, 1, 0, X)
Writing 1 to ARBLOIF
A START will be transmitted
when the bus becomes free
Enter not addressed SLV mode
Enter not addressed SLV mode
Send a START when bus
becomes free
Send a START when bus
becomes free
MR
MT
MR
Sr
ACK
ACK
NAK
TXDAT
(SLA)
S
NAK
S
ACK/
NAK
STORIF = 1
Writing 1 to STORIF
Writing 1 to STORIF
TXDAT
(SLA+R)
TXDAT = SLA+R
(PTRG, STA, STO, AA)=(1, 0, 0, 1)
ARBLOIF = 1
ACK
To corresponding states in
slave mode
TXDAT = SLA+W
(PTRG, STA, STO, AA)=(1, 0, 0, x)
Write 1 to STARIF
TXDAT
(SLA+W)
TXDAT = SLA+R
(PTRG, STA, STO, AA)=(1, 0, 0, x)
Write 1 to STARIF
ACK
ACKIF = 1
ACK
ACKIF = 1
TXDAT = SLA
(PTRG, STA, STO, AA)=(1, 0, 0, x)
Write 1 to ACKIF
Figure 6.15-16 Master Recevier Mode Control Flow with 10-bit Address
If the I
2
C is in Master mode and gets arbitration lost, the bit of ARBLOIF (UI2C_PROTSTS [11]) will be
set. User may writing 1 to ARBLOIF (UI2C_PROTSTS [11]) and set (PTRG, STA, STO, AA) = (1, 1, 0,
X) to send START to re-start Master operation when bus become free. Otherwise, user may writing 1 to
ARBLOIF (UI2C_PROTSTS [11]) and set (PTRG, STA, STO, AA) = (1, 0, 0, X) to release I
2
C bus and
enter not addressed Slave mode.
Slave Mode
When reset, I
2
C is not addressed and will not recognize the address on I
2
C bus. User can set device
address by UI2C_DEVADDRn and set (PTRG, STA, STO, AA) = (1, 0, 0, 1) to let I
2
C recognize the
address sent by master. Figure 6.15-17 shows all the possible flow for I
2
C in Slave mode. Users need
to follow a proper flow (as shown in Figure 6.15-17 to implement their own I
2
C protocol.
If bus arbitration is lost in Master mode, I
2
C port switches to Slave mode immediately and can detect its
own slave address in the same serial transfer. If the detected address is SLA+W (Master want to write
data to Slave) or SLA+R (Master want to read data from Slave) after arbitration lost, the ARBLOIF will
be set to 1.
The I
2
C controller supports two slave address match flags, are ADMAT0 and ADMAT1 on
UI2C_ADMAT[1:0] register. Every control register represent which address is used and set 1 to inform
software.
Note:
During I
2
C communication, the SCL clock will be released when writing ‘1’ to PTRG
(UI2C_PROTCTL [5]) in Slave mode.