NXP Semiconductors
QN902x
User Manual of QN902x
UM10996
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2018. All rights reserved.
User Manual
Rev 1.3
— 05 November 2018
60 of 128
7-bit slave address and the read/write bit. In the master mode, the slave address should
be put into TXD to send. While in the slave mode, the slave address should be written
into SLAVE_ADDR[6:0], and the bus controller will monitor incoming slave address on the
SDA line to check if the address matches and this is the slave device to be addressed by
the master.
7.2.2
R/nW bit
The last bit following 7-bit slave address after START condition is the R/nW bit in the first
byte. The R/nW bit signal is sent by master device to set the data transfer direction. When
R/nW bit is 0, the I2C bus interface is in the write mode and the data transfer direction is
from master to slave. When R/nW bit is 1, the I2C bus interface is in the read mode and
the data transfer direction is from the slave to the master.
7.2.3
ACK/NACK
After completing the transfer of one-byte, the receiver should send an ACK bit to the
transmitter. The ACK pulse should occur during the 9th clock cycle of the SCL line. The
clock pulse required to transmit the ACK bit master should be generated by the master.
The transmitter should release the SDA line when the ACK clock pulse is received. The
receiver should also drive the SDA line low during the ACK clock pulse so that the SDA
keeps low during the high period of the ninth SCL pulse. The receiver will not drive the
SDA line low during ninth clock cycle if NACK is to be sent.
7.2.4
Data transfer
Once a successful slave addressing has been established, the data transfer can proceed
on a byte-by-byte basis in the direction specified by the R/nW bit sent by the master. Each
transferred byte is followed by an ACK bit on the 9th SCL clock cycle.
7.2.5
Stop or Repeated START signal
When the transfer ends, or is abnormal, the master will generate a STOP signal to abort
the data transfer or generate a Repeated START signal to start a new transfer cycle.
If the master, as the receiving device, does not acknowledge the slave device, the slave
device releases the SDA line for the master to generate a STOP or Repeated START signal.
7.2.6
SCL clock generation in master mode
The SCL is derived from PCLK, with a two-stage clock divider. The first one is a constant
divided by 20, and the second is divided by (SCL 1).
SCL = (PCLK/20)/(SCL 1)
7.3
Master Mode Operation
7.3.1
Master-transmit
The master initiates the data transfer with a START condition, followed by the Slave
Address and R/nW bit. If R/nW is low, the data transfer occurs from the master to the
slave. The ACK/NACK bit is sent by the slave. After the master receives the ACK/NACK bit,