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
78 of 128
The SPI_CLK is also needed by the slave device to operate. The speed should be at least
6 times faster than the SCK frequency of the master device to ensure a reliable
transmission.
Clock
Divider
USART0_DIV_BYPASS
USART0_DIVIDER[2:0]
SPI_CLK0
AHB_CLK
SCK0
Clock
Divider
USART1_DIV_BYPASS
USART1_DIVIDER[2:0]
SCK
Generator
SCK
Generator
SCK1
SPI_CLK1
BITRATE[5:0]
BITRATE[5:0]
10.2.5
TX/RX Buffer
Both TX and RX buffer are 32-bit, which can be configured as one 32-bit word buffer, or
4x8-bit FIFO.
10.2.6
Interrupt
When the SPI interrupt is enabled, the following 2 flags will generate an interrupt request:
1. RX buffer not empty interrupt: RX_FIFO_NEPT_IF flag is set to logic 1 if the received
data is moved into RX buffer. The flag is cleared automatically once the RXD is read and
the RX buffer is empty.
2. TX buffer not full interrupt: TX_FIFO_NFUL_IF is set to logic 1 if all data in TX buffer
have been transmitted and the TX buffer can be written again.
10.3
Register Description
10.3.1
Register Map
The SPI0 and SPI1 have the same register map, but different base addresses. The base
address of SPI0 is 0x40007800. The base address of SPI1 is 0x4000A800.
Table 53 SPI0/SPI1 Register Map
Offset
Name
Description
000h
CR0
Control register 0
004h
CR1
Control register 1
008h
RSVD
Reserved
00Ch
RSVD
Reserved
010h
TXD
TX data register
014h
RXD
RX data register
018h
SR
Status register