AnsweredAssumed Answered

LPC2388 uart1 cann't send message

Question asked by Li Yabin on Oct 18, 2017
Latest reply on Nov 7, 2017 by Li Yabin

I  use the LPC2388 microcontroller in my  system. 

Config  as below.

Uart0 could correctly send message ,but uart1 could not correctly send message .

Thank you for your help !

 

PINSEL4 &= 0xFFFFFFF0;
PINSEL4 |= 0x0000000A; /* Enable RxD1 P2.1 *//* Enable TxD1 P2.0 */

PCONP |= (1UL << 4); //Enable UART1 interface power/clock
U1LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
U1DLL = 4; /* for 12MHz PCLK Clock ,baudrate 115200*/
U1FDR = 0x85; /* for 12MHz PCLK Clock */
U1LCR = 0x03; /* DLAB = 0 */

PINSEL0 &= 0xFFFFFF0F;
PINSEL0 |= 0x00000050;

PCONP |= (1UL << 3); /* Enable UART0 interface power/clock */
U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
U0DLL = 4; /* for 12MHz PCLK Clock */
U0FDR = 0x85; 
U0LCR = 0x03;

 

int SER1_PutChar (int ch) {

while (!(U1LSR & 0x20));
U1THR = ch;
while (!(U0LSR & 0x20));
U0THR = ch;
return (ch);
}

Outcomes