16-10
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
Figure 16.4.3.2 Master Mode Data Reception Flowchart
Data reception using DMA
By setting the I2C_
n
RBFDMAEN.RBFDMAEN
x
bit to 1 (DMA transfer request enabled), a DMA
transfer request is sent to the DMA controller and the received data is transferred from the
I2C_
n
RXD register to the specified memory via DMA Ch.
x
when the I2C_
n
INTF.RBFIF bit is set to 1
(receive buffer full).
This automates the data receiving procedure Steps 5, 7, and 9 described above.
The transfer source/destination and control data must be set for the DMA controller and the
relevant DMA channel must be enabled to start a DMA transfer in advance. For more information on
DMA, refer to the
“DMA Controller” chapte
r.
Table 16.4.3.1 DMA Data Structure Configuration Example (for Data Reception)
Item
Setting example
End pointer
Transfer source
I2C_
n
RXD register address
Transfer
destination
Memory address to which the last received data is stored
Control data
dst_inc
0x0 (+1)
dst_size
0x0 (byte)
src_inc
0x3 (no increment)
src_size
0x0 (byte)
R_power
0x0 (arbitrated for every transfer)
n_minus_1
Number of receive data
cycle_ctrl
0x1 (basic transfer)
Data reception
Write 1 to the I2C_
n
CTL.TXNACK bit
One-byte reception?
Write 1 to the I2C_
n
CTL.TXSTART bit
Write slave address and READ(1) to
the I2C_
n
TXD register
Write 1 to the I2C_
n
CTL.TXSTOP bit
I2C_
n
INTF.RBFIF = 1 ?
Last data received?
Receive last data next?
Retry?
Wait for an interrupt request
(I2C_
n
INTF.TBEIF = 1)
End
Wait for an interrupt request
(I2C_
n
INTF.STOPIF = 1)
Wait for an interrupt request
(I2C_
n
INTF.RBFIF = 1 or I2C_
n
INTF.NACKIF = 1)
Write 1 to the I2C_
n
CTL.TXNACK bit
Write 1 to the I2C_
n
CTL.TXSTOP bit
Read receive data
from the I2C_
n
RXD register
Read receive data
from the I2C_
n
RXD register
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Содержание S1C31D50
Страница 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Страница 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Страница 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Страница 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...