Inter-Integrated Circuit Bus Controller Module (I
2
C)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
27-22
Freescale Semiconductor
Preliminary
Figure 27-15. Flowchart of DMA Mode Master Receive
27.5.2.3
Exiting DMA Mode, System Requirement Considerations
As described above, the final transfers of both Tx and Rx transfers need to be managed via interrupt by the
CPU. To change from DMA to interrupt driven transfers in the I
2
C module, disable the DMAEN bit in the
IBCR register. The trigger to exit the DMA mode is that the programmed DMA transfer control descriptor
(TCD) has completed all its transfers to/from the I
2
C module.
Config I
2
C for
Master TX
interrupt
generated
Arb Lost or
No ack ?
CPU handles
condition
yes
no
CPU sets TX/RX
to RX
CPU: dummy
CPU sets
DMAENABLE
read of DATAreg
DMA reads byte
ipd_rx_req
generated
of data
Slave TX one
byte of data
DMA read
data ?
(n-2) bytes of
no
yes
CPU clears
DMA enable
Slave TX n-1
data byte
interrupt
generated
CPU reads n-1
data
CPU sets
TXACK
Slave TX last
data byte
interrupt
generated
CPU reads last
data byte
Stop
generated
Start
Generated
CPU writes calling
address to slave