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.
<!--break-->
We are using UART1 interface without Modem capabilities. Follwing is our initialization code:
[color=#781216]
<code>
//configure pin selections for UART1
      // configure UART
      // enable power to UART
      PCONP |= (1 << MODBUS_OPTION2_POWER_BIT);
[color=#781216]
      // RX and TX interrupts
      U1IER = 0x3;
[color=#781216]
      // DLAB = 1
      U1LCR = 0x83;
[color=#781216]
      U1FCR = 0x87; //Issue:actual value set is 0xC1
[color=#781216]
 //Set Parity bit, Stop bit and baud rate according to application
[color=#781216]
      U1LCR &= 0x7F ; // DLAB = 0
[color=#781216]
      U1IER = 0x07;
</code>[/color][/color][/color][/color][/color][/color][/color]
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.