7UART0
26
Copyright © 2018, www.
bluetrum.com. All Rights Reserved
26
Bit
Name
Mode
Default
Description
15:10
-
-
-
Unused
9
CRXPND
W
0
RX pending clear
0: N/A
1: Clear RX Pending
8
CTXPND
W
0
TX pending clear
0: N/A
1: Clear TX Pending. Writing data to UTBUF will clear TXPND
7:0
-
-
-
Unused
Register 7-3UART0BAUD: UART Baud Rate Register
Bit
Name
Mode
Default
Description
31:16
UART0RXBAUD
W
0
UART RX Baud Rate
Baud Rate =Fsys clock / (UART0 1)
15:0
UART0TXBAUD
W
0
UART TX Baud Rate
Baud Rate =Fsys clock / (UART0 1)
Register 7-4 UART0DATA: UART Data Register
Bit
Name
Mode
Default
Description
31:9
-
-
-
Unused
8
UART0BIT8
WR
x
UART Data bit 8
7:0
UART0DAT
WR
x
UART Data
Write this register will load the data to transmitter buffer.
Read this register will read the data from the receiver buffer..
7.3
User Guide
1.
Set IO in the correct direction.
2.
Configure UART0BAUD to choose sample rate
3.
Enable UART0 by setting
4.
Set TXIE or RXIE
‘
to
1’
if needed
5.
write data to UART0DATA
6.
Wait for PND to change to ‘1’, or wait for interrupt
7.
Read received data from UART0DATA if needed