![Maxim Integrated MAX32660 Скачать руководство пользователя страница 135](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484135.webp)
MAX32660 User Guide
Maxim Integrated
Page 135 of 195
The process for an I
2
C data transfer is as follows:
1.
A bus master indicates a data transfer to a slave with a START condition.
2.
The master then transmits one byte with a 7-bit slave address and a single read-write bit: a zero for a write or a
one for a read.
3.
During the next SCL clock following the read-write bit, the master releases SDA. During this clock period, the
addressed slave responds with an ACK by pulling SDA low.
4.
The master senses the ACK condition and begins transferring data. If reading from the slave, it floats SDA and
allows the slave to drive SDA to send data. After each byte, the master drives SDA low to acknowledge the byte. If
writing to the slave, the master drives data on the SDA circuit for each of the eight bits of the byte, and then floats
SDA during the ninth bit to allow the slave to reply with the ACK indication.
5.
After the last byte is transferred, the master indicates the transfer is complete by generating a STOP condition. A
STOP condition is generated when the master pulls SDA from a low to high while SCL is high.
12.3.8
SCL and SDA Bus Drivers
The I
2
C bus expects SCL and SDA to be open-drain signals. In the MAX32660, once the I
2
C peripheral is enabled and the
proper GPIO alternate function is selected, the corresponding pad circuits are automatically configured as open-drain
outputs. However, SCL can also be optionally configured as a push-pull driver to conserve power and avoid the need for any
pull-up resistor. This should only be used in systems where no I
2
C slave device can hold the SCL line low. Push-pull
operation is enabled by setting
.sclppm
to 1. (SDA always operates in open-drain mode.)
12.3.9
I
2
C Interrupt Sources
The I
2
C Controller has a very flexible interrupt generator that generates an interrupt signal to the Interrupt Controller on
any of several events. On recognizing the I
2
C interrupt, firmware determines the cause of the interrupt by reading the I
2
C
Interrupt Flags registers
and
. Interrupts can be generated for the following events:
•
Transaction Complete (Master/Slave)
•
Address NACK received from slave (Master)
•
Data NACK received from slave (Master)
•
Lost arbitration (Master)
•
Transaction timeout (Master/Slave)
•
FIFO is empty, not empty, full to configurable threshold level (Master/Slave)
•
TX FIFO locked (Master/Slave)
•
Out of sequence START and STOP conditions (Master/Slave)
•
Sent a NACK to an external master because the TX or RX FIFO was not ready (Slave)
•
Address ACK or NACK received (Master)
•
Incoming address match (Slave)
•
TX Underflow or RX Overflow (Slave)
Interrupts for each event can be enabled or disabled by setting or clearing the corresponding bit in the
or
Note: Disabling the interrupt does not prevent the corresponding flag from being set by hardware but does prevent an IRQ
when the interrupt flag is set.
Note: Prior to enabling an interrupt, the status of the corresponding interrupt flag should be checked and, if necessary,
serviced or cleared. This prevents a previous interrupt event from interfering with a new I
2
C communications session.
Содержание MAX32660
Страница 4: ...MAX32660 User Guide Maxim Integrated Page 4 of 195 8 UART 84 9 Real Time Clock RTC 96 10 Timers 105...
Страница 7: ...MAX32660 User Guide Maxim Integrated Page 7 of 195 15 Trademarks 195 16 Revision History 195...
Страница 14: ...MAX32660 User Guide Maxim Integrated Page 14 of 195 Figure 2 1 MAX32660 High Level Block Diagram...