
NUC126
Aug. 08, 2018
Page
734
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
6.19.4.2 Data Buffering
The data handling of the USCI controller is based on a Data Shift Unit (DSU) and a buffer structure.
Both of the data shift and buffer registers are 16-bit wide. The inputs of Data Shift Unit include the shift
data, the serial bus clock, and the shift control. The output pin of transmission can be USCIx_DAT0 pin
or USCIx_DAT1 pin depends on what protocol is selected.
Data
Shift
Unit
(DSU)
TX_BUF
P
e
ri
p
h
e
ra
l
D
e
v
ic
e
U
s
e
r
in
te
rf
a
c
e
Data In/Out
(USCIx_DAT0/1)
Serial Bus
Clock Input
(USCIx_CLK)
Control Input
(USCIx_CTL0)
TX_DATA
RX_DATA
Transmit Data Buffer
Receive Data Buffer
TX_SFTR
RX_SFTR
RX_BUF0
RX_BUF1
Figure 6.19-4 Block Diagram of Data Buffering
The operation of data handling includes:
The peripheral device user interface (APB) is used to handle data, interrupts, status and
control information.
A transmitter includes transmit shift register (TX_SFTR) and a transmit data buffer
(TX_BUF). The TXFULL / TXEMPTY (USCI_BUFSTS[9:8]) and TXENDIF
(USCI_PROTSTS[2]) can indicate the status of transmitter.
A receiver includes receive shift register (RX_SFTR) and a double receive buffer structure
(RX_BUF0, RX_BUF1). In double buffer structure, user need not care about the reception
sequence and two received data can be hold if user does not read the data of
USCI_RXDAT register in time.
Data Access Structure
The Data Access Structure includes read access to received data and write access of data to be
transmitted. The received data is stored in the receiver buffers including RX_BUF0 and RX_BUF1.
User need not care about the reception sequence. The receive buffer can be accessed by reading
USCI_RXDAT register. The first received data is read out first and the next received data becomes
visible in USCI_RXDAT and can be read out next.
Transmit data can be loaded to TX_BUF by writing to the transmit register USCI_TXDAT.