BAT32G1x9 user manual | Chapter 20 Serial interface IICA
742 / 1149
Rev.1.02
20.3.3
IICA status register n (IICSn).
This is the register that represents the
I2C
state.
The IICSn register can only be read by the 8-bit memory operation instruction during the STTn bit "1" and
waiting. After generating a reset signal, the value of this register changes to "00H".
Note: In the allowed address matching wake function (WUPn=1) state in
deep sleep
mode, reading
the IICSn
register is
prohibited. In the
state where
the
WUPn
bit is
"1"
,
it has nothing to do
with
the INTIICAn
interrupt request if you change the
WUPn
bit from
"1"
to
"0"
(Stop wake-up run) reflects a change in state until the next start condition or stop
condition is detected.
Therefore, to use the wake-up function, it is necessary to allow
(SPIEn=1) an interrupt due to the detection of a stop condition,
and to read the
IICSn
register after the interrupt is detected
.
remark
STTn
: Bit1 of IICA control register n0 (IICCTLn0).
WUPn
: Bit7 of IICA control register n1 (IICCTLn1).
Figure 20-6
Format of IICA status register n (IICSn) (1/3).
After reset: 00H
R
symbol
7
6
5
4
3
2
1
0
IICSn
MSTSn
ALDn
EXCn
COIn
TRCn
ACKDn
STDn
SPDn
MSTSn
Confirmation flag for the master status
0
Slave state or communication standby
1
Master communication status
Clear condition (MSTSn=0,1).
Set condition (MSTSn=1).
•When a stop condition is detected
• When the ALDn bit is "1" (arbitration failed).
• Cleared because the LRELn bit is "1" (Exit Communication).
• When the IICEn bit changes from "1" to "0" (stops running)
.
• When resetting
•When the build starts condition
ALDn
Detection of arbitration failures
0
Indicates that no arbitration occurred or was won.
1
Indicates that the arbitration failed. Clear the MSTSn
bit.
Clear condition (ALDn=0,1).
Set condition (ALDn=1).
• Automatically clears
the
note after reading the IICSn register.
• When the IICEn bit changes from "1" to "0" (stops running).
• When resetting
• When arbitration fails
Note: This
bit is cleared even if the bit memory manipulation instruction is executed on a bit other than the IICSn register.
Therefore, when using
aldn
bits, the data for
the ALDn
bits must be read before reading other
bits.
Remarks: 1. LRELn:
Bit6
of
IICA
control register
n0
(IICCTLn0
).
IICEn:
Bit7
of
IICA
control register
n0
(IICCTLn0
).
2. n=0.1