nuvoton - UART

UART 的特性

  • 4 channel 的 UART 模組
  • 支援 Auto-Baud Detect
  • 支援 Auto Flow Control Function
  • 支援 nCTS and RX data wake-up function
  • 支援 Fully programmable serial-interface
    • Programmable number of data bit. 5-, 6-, 7-, 8- bit character
    • Programmable parity bit. even, odd, no parity
    • Programmable stop bit. 1, 1.5, 2 bits
  • 支援 IrDA SIR function mode
    • support 3/16 bit duration for normal mode
  • 支援 LIN function mode in UART #0/#1
    • support master/slave mode
    • support programmable break generation for transmitter
    • support break detection for receiver
  • 支援 RS-485 function mode
    • support 9 bit mode
    • support hardware and software enables to program nRTS 

UART Clock Source

  • HIRC (22.1184 MHz)
  • HXT (4-24MHz)
  • PLL 

UART Block Diagram


UART baud rate work mode

Mode
BAUDM[1:0]
Baud Rate Equation
Mode 0
00b
UART_CLK / (16 * (BRD+2))
Mode 1
10b
UART_CLK / ((EDIVM1+1) * (BRD+2))
EDIVM1 >= 8
Mode 2
11b
UART_CLK / (BRD+2)
UART_CLK <= 3*HCLK. BRD >= 9
UART_CLK > 3*HCLK. BRD >= 3 * N -1 
(N > (UART_CLK/HCLK)


UART Peripheral Clock = 22.1184 MHz
Baud Rate
Mode 0
Mode 1
Mode 2
921600
No Support
BRD=0, EDIVM1=11
BRD=22
460800
BRD=1
BRD=1, EDIVM1=15
BRD=2, EDIVM1=11
BRD=46
230400
BRD=4
BRD=4, EDIVM1=15
BRD=6, EDIVM1=11
BRD=94
115200
BRD=10
BRD=10, EDIVM1=15
BRD=14, EDIVM1=11
BRD=190
57600
BRD=22
BRD=22, EDIVM1=15
BRD=30, EDIVM1=11
BRD=382
38400
BRD=34
BRD=34, EDIVM1=15
BRD=46, EDIVM1=11
BRD=62, EDIVM1=8
BRD=574
19200
BRD=70
BRD=70, EDIVM1=15
BRD=94, EDIVM1=11
BRD=126, EDIVM1=8
BRD=1150

UART auto baud rate detection

  • 經由 UART RX pin 來偵測 baud rate
  • 取得 baud rate 後, 儲存於 UART_BAUD[15:0]
  • BAUDM[1:0] = 11b
  • UART RX data 的 Start bit 為 1

UART auto flow control

  • 僅 UART0/UART1 才支援 auto flow
  • 支援由 /CTS wake-up 

UART wake up 

  • Wake up from CTS
    • CTS pin from
    • CTS pin from
  • Wake up from Rx

IrDA 

  • 支援 IrDA 傳送器或者接收器
  • 支援 IR_SOUT/IR_SIN 切換功能


LIN

  • LIN header selection
    • Break field
    • Sync field
    • Identifier field
  • LIN break field count setting ( 8 - 15 bits )
  • 支援 LIN header and bit error detect interrupt


RS-485

  • RTSn 可由 hardware 控制或者 software 控制
  • 支援模式
    • Normal Multi-Drop Operation Mode (NMM)
    • Auto Address Detection Operation Mode (AAD)
    • Auto Direction Mode (AUD)




Smart Card UART mode

  • 支援 smart card 的 Full duplex asynchronous communication
  • TX/RX 支援 4/4 bytes entry FIFO 的資料傳輸
  • UART enable, 產生一個 reset 去 reset FIFO 和晶片的 internal state machine. 

Reference document :

  • nuvoton NuMicro-M451-Series-Training-Material
  • nuvoton TRM_M451_Series_EN_Rev2.08 

留言

這個網誌中的熱門文章

EC 所需知識 - SMBUS

EC 所需知識 - LPC

EC 所需知識 - KBC