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
95 of 128
the transfer of a byte is in progress, the transmitter completes sending this byte.
12.2.4
Interrupt
With UART0/1 interrupts enabled, an interrupt is generated each time a transmission is
completed (TX_IE is set in UART_CR), or a data byte has been received (RX_IE is set in
UART_CR). The UART0/1 interrupt flags except UART_INT are not cleared by hardware
when the CPU vectors to the interrupt service routine. They must be cleared manually
by software, allowing the software to determine the cause of the UART0/1 interrupt
(transmit complete or receive complete).The UART_INT will be auto cleared by software
when all UART0/1 interrupt flags are cleared.
12.2.5
Programming flow
•
The write operation consists of the following steps:
1.
If TX flow control is enabled, wait for valid cts_uart_n (low level).
2.
Configure UART_TXD register
3.
Configure UART_BAUD register
4.
Configure UART_CR register
5.
Read TX_IE bit in UART_CR register. If TX_IE is 1(TX buffer is empty), then go to step
2, else wait until TX buffer becomes empty.
6.
If another data is to be transferred, then configure UART_TXD when TX_IE is 1; else
finish.(if baud rate and control information remain unchanged, then there is no need
to re-configure UART_BAUD and UART_CR )