EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 530

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 14 Serial interface IICA
www.mcu.com.cn 530 / 703
An example of a step for a slave to process via an INTIICAn interrupt is shown below (in this case, it is
assumed that no extension code is used). The status is confirmed by INTIICAn interrupt and the following
processing is performed.
(1) If a stop condition is generated, the communication ends.
(2) If a start condition is generated, confirm the address. If the addresses are different, the communication
ends. If the addresses are the same, set to communication mode and unwait, and then return from the
interrupt (clear the readiness flag).
(3) When sending and receiving data, as long as the ready flag is asserted, the I2Cbus remains in a
waiting state and returns from the interrupt.
Remark (1) to (3) above corresponds to (1) ~ (3) of Figure 14-30 Slave operation step (2)
Figure 14-30 Slave operation step (2)
generate INTIICAn
SPDn=1
STDn=1
set ready flag to '1'
No
No
COIn=1
Yes
communiction direction flag
TRCn
set communication mode flag bit,
clear ready flag
clear communication direction flag,
ready flag and communication
mode flag
No
Yes
Yes
interrupt handling completes
Remark n=0

Table of Contents

Related product manuals