![Maxim Integrated MAX32660 User Manual Download Page 144](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484144.webp)
MAX32660 User Guide
Maxim Integrated
Page 144 of 195
The required steps for implementing TX FIFO Preloading in an application are as follow:
1.
Set
txrdy
to 0
2.
Enable TX FIFO Preloading by setting
txpreld
to 1.
3.
If the TX FIFO Lockout Flag (
txloi
) is set to 1, write 1 to clear the flag and enable writes to the TX FIFO.
4.
Enable DMA or Interrupts if required.
5.
Load the TX FIFO with the data to send when the Master sends the next read request.
6.
Set
txrdy
to 1 to automatically let the hardware send the preloaded FIFO on the next read from a
Master.
7.
txrdy
is cleared by hardware when a read occurs, and data is transmitted from the TX FIFO.
a.
Once cleared, the application firmware may repeat the Preloading process or disable TX FIFO Preloading.
Note: The TX FIFO Lockout flag is set if an error condition occurs while TX FIFO Preloading is enabled.
12.15
Master Mode Receiver Operation
When in Master Mode, initiating a Master Receiver operation begins with the following sequence:
1.
Write the number of data bytes to receive to the I
2
C Receive Count field (
.rxcnt).
2.
Write the Slave Address to the TX FIFO with the R/W bit set to 1
3.
Send a START condition by setting
.start =
1
4.
The slave address is transmitted by the controller from the TX FIFO.
5.
The I
2
C controller receives an ACK from the slave and the controller sets address ACK field
.adracki =
1).
6.
The I
2
C controller receives data from the slave and automatically ACKs each byte.
7.
.rxcnt
data bytes have been received, the I
2
C controller sends a NACK to the slave and sets the
Transfer Done Interrupt Status Flag (
donei
= 1).
8.
.restart
or
.stop
is set, then the I
2
C controller sends a repeated START or
STOP, respectively.
12.16
I
2
C Registers
The I2C0 base peripheral address is 0x4001 D000. The I2C1 base peripheral address is 0x4001 E000. Refer to
for the addresses of all APB mapped peripherals.
Table 12-3: I
2
C Registers
Offset
Register Name
Access
Description
[0x0000]
R/W
I
2
C Control 0 Register
[0x0004]
RO
I
2
C Status Register
[0x0008]
R/W1C
I
2
C Interrupt Flags 0 Register
[0x000C]
R/W
I
2
C Interrupt Enable 0 Register
[0x0010]
R/W1C
I
2
C Interrupts Flags 1 Register
[0x0014]
R/W
I
2
C Interrupts Enable 1 Register
[0x0018]
RO
I
2
C FIFO Length Register
[0x001C]
R/W
I
2
C Receive Control 0 Register
[0x0020]
R/W
I
2
C Receive Control 1 Register 1
[0x0024]
R/W
I
2
C Transmit Control 0 Register 0
[0x0028]
R/W
I
2
C Transmit Control 1 Register 1
[0x002C]
R/W
I
2
C Transmit and Receive FIFO Register
[0x0030]
R/W
I
2
C Master Mode Register