Issue with UART FCR Register

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by blueshif on Thu Apr 28 00:27:55 MST 2016
Hi all,

We are developing on Keil uVision v4.74 for LPC2478 controller and using Keil ULinkPro for debugging. We are facing issues with the UART FIFO Control Register.
We are using UART1 interface without Modem capabilities. Follwing is our initialization code:
//configure pin selections for UART1
      // configure UART
      // enable power to UART
      // RX and TX interrupts
      U1IER = 0x3;
      // DLAB = 1
      U1LCR = 0x83;
      U1FCR = 0x87; //Issue:actual value set is 0xC1
//Set Parity bit, Stop bit and baud rate according to application
      U1LCR &= 0x7F ; // DLAB = 0
      U1IER = 0x07;

The issue we are facing with the UART1 Fifo Control Register U1FCR is not setting the value correctly. U1FCR has following structure:

Bit 0   - FIFO Enable
Bit 1   - Rx FIFO Reset
Bit 2   - Tx FIFO Reset
Bit 5:3 - Reserved
Bit 7:6 - Rx Trigger Level
          00 - Trigger level 0 (1 character or 0x01)
          01 - Trigger level 1 (4 characters or 0x04)
          10 - Trigger level 2 (8 characters or 0x08)
          11 - Trigger level 3 (14 characters or 0x0E)

Everytime we set value 0x87(Trigger Level 2, Rx-Tx Fifo Reset, FIFO Enable), it is setting as 0xC1(Trigger Level 3,FIFO Enable)

Help needed seriously.