Freescale Semiconductor MPC5200B User Manual page 638

Freescale semiconductor board users guide
Table of Contents

Advertisement

Figure 18-9. Software Flowchart of Typical I2C Interrupt Routine
TX
Last Byte
Y
Transmitted
?
N
RXAK=0
N
?
Y
End Of
Y
Addr Cycle
(Master Rx)
?
N
Write Next
Byte To MDR
Switch To
Rx Mode
Dummy Read
Generate
From MDR
Stop Signal
Freescale Semiconductor
Y
Tx/Rx
RX
?
Last
Byte To Be Read
Y
?
N
2nd Last
Y
Byte To Be Read
?
N
Generate
Set TXAK =1
Stop Signal
Read Data
From MDR
And Store
RTI
MPC5200B Users Guide, Rev. 1
Clear
IF
Master
N
Mode
?
N
AAS=1
?
Y
Clear AL
N
AKF=1
?
Y
Clear AKF, AL
Address
Transfer
Y
(Read)
SRW=1
?
(Write)
N
Set TX
Mode
Tx Next
Write Data
To MDR
Set RX
Mode
Dummy Read
From MDR
Transfer Initiation and Interrupt
Arbitration
Y
Lost
?
N
Y
AAS=1
?
N
Data Transfer
TX/RX
RX
?
TX
ACK From
Y
Receiver
?
N
Read Data
From MDR
Byte
And Store
Switch To
Rx Mode
Dummy Read
From MDR
18-21

Advertisement

Table of Contents
loading

Table of Contents