
M0A21/M0A23 Series
May 06, 2022
Page
573
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
In this case, during the address and data transmission, the master transmitter checks at the rising edge
of SCL for each data bit if the value it is sending is equal to the value read on the SDA line. If yes, master
can hold bus continuously. If this is not the case (transmitted value = 1, value read = 0), the master has
lost the transmit arbitration. This is indicated by interrupt flag ARBLOIF (UI2C_PROTSTS [11]) and can
generate a protocol interrupt if enabled by ARBLOIEN (UI2C_PROTIEN [4]).
When the transmit arbitration has been lost, the software has to initialize the complete frame again,
starting with the first address byte together with the START condition for a new master transmit attempt.
Arbitration also takes place for the ACK bit. If master arbitration lost and match the device address, then
master will turn to slave.
Transmission Chain
The I
2
C bus protocol requiring a kind of in-bit-response during the arbitration phase and while a slave is
transmitting, the resulting loop delay of the transmission chain can limit the reachable maximal baud
rate, strongly depending on the bus characteristics (bus load, module frequency, etc.).
The shift clock SCL is generated by the master device, output on the wire, then it passes through the
input stage and the input filter. Now, the edges can be detected and the SDA data signal can be
generated accordingly. The SDA signal passes through the output stage and the wire to the master
receiver part. There, it passes through the input stage and the input filter before it is sampled.
This complete loop has to be finished (including all settling times to obtain stable signal levels) before
the SCL signal changes again. The delays in this path have to be taken into account for the calculation
of the baud rate as a function of
f
PCLK
and
f
PROT_CLK
. We suggest user adopt
f
PCLK
.
Non-Acknowledge and Error Conditions
In case of a non-acknowledge (NACKIF (UI2C_PROTSTS [10])) or an error (ERRIF(UI2C_PROTSTS
[12])), no further transmission will take place. User software doesn’t invalidate the transmit buffer and
disable transmissions, before configuring the transmission (by writing TXDAT) again with appropriate
values to react on the previous event.
I
2
C Protocol Interrupt Events
The following protocol-related events are generated in I
2
C mode and can lead to a protocol interrupt.
Please note that the bits in register UI2C_PROTSTS are not all automatically cleared by hardware and
have to be cleared by software in order to monitor new incoming events.
START condition received at a correct position in a frame (STARIF (UI2C_PROTSTS
[8]))
STOP condition transferred at a correct position in a frame (STORIF (UI2C_PROTSTS
[9]))
Master arbitration lost (ARBLOIF (UI2C_PROTSTS [11]))
Slave read requested (SLAREAD (UI2C_PROTSTS [15]))
Acknowledge received (ACKIF (UI2C_PROTSTS [13]))
Non-acknowledge received (NACKIF (UI2C_PROTSTS [10]))
START condition not at the expected position in a frame (ERRIF (UI2C_PROTSTS [12]))
STOP condition not at the expected position in a frame (ERRIF (UI2C_PROTSTS [12]))
Operating the I2C
To operate the I
2
C protocol, the following issues have to be considered:
Select I
2
C Mode
It is recommended to configure all parameters of the I
2
C that do not change during run time while