Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
260
13.2.11.1.3
Receive Watermark Level Select
During I
2
C serial transfers, receive FIFO requests are made to the DMA Controller whenever the number of entries in the receive FIFO is at or
above the DMA Receive Data Level Register(IC_DMA_RDLR); that is, IC_D1. This is known as the watermark level. The DMA
Controller responds by fetching a burst of data from the receive FIFO buffer of length CTLx.SRC_MSIZE.
Data should be fetched by the DMA often enough for the receive FIFO to accept serial transfers continuously; that is, when the FIFO begins to
fill, another DMA transfer is requested. Otherwise, the FIFO will fill with data (overflow). To prevent this condition, the user must correctly set
the watermark level.
Similar to choosing the transmit watermark level described earlier, the receive watermark level, IC_D1, should be set to minimize
the probability of overflow. For optimal operation, DMA.CTL
x
.SRC_MSIZE should be set at the watermark level; that is:
13.2.11.2
8-Bit FIFO with DMA Transfer Control Register
For 8-bit FIFO mode, two methods are provided for different use scenario: 8-bit FIFO with DMA transfer control register and 8-bit FIFO with
DMA transfer descriptor. In these methods, I
2
C must co-operate with GDMA channels. To change DMA mode, a DMA mode register is added.
Software should set a correct value to DMA mode field before any further setup. Both Master and Slave mode can use this DMA mode.
In 8-bit FIFO with DMA transfer control register mode, transfer process is controlled by two additional register: IC_DMA_CMD and
IC_DMA_DATA_LEN register. Besides these registers, a significant difference from normal I
2
C DMA operation is that software doesn’t need to
fill dummy read command into TXFIFO of I
2
C. Since transfer data length could be given in DMA transfer data length register.
8-Bit TxFIFO with
transfer descriptor and data entries
DATA0
DATA1
DATAn -1
7
6
5
4
3
2
1
0
STP
SR
R/
W
RSVD
DMA transfer control register
7
6
5
4
3
2
1
0
Data LEN
DMA transfer data length register
7
6
5
4
3
2
1
0
DMA mode register
7
6
5
4
3
2
1
0
DMA
mode
RSVD
EN
Fig 13-21 I
2
C 8-bit FIFO content with transfer control register
IC_DMA_CMD contains several fields: R/W is for transfer direction. SR is to drive a RESTART signal or not after the last data transferred. STP is
to drive a STOP signal or not after the last data transferred.
13.2.12
Low Power Mode
The Ameba-D provides two sleep modes to reduce power consumption:
sleep mode stops the processor clock
deep sleep mode stops the system clock and switches off the PLL and flash memory
To sleep mode, Ameba-D provides many wakeup source, such as Timer, GPIO, RTC, I
2
C. For I
2
C transmission, master device need to dominate
the transfer, so it can’t sleep. Slave device can sleep and be wakeup when the address sent by master matching its address. Ameba-D I
2
C also
supports low power mode to reduce power consumption.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03