LPC2388 uart1 cann't send message

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC2388 uart1 cann't send message

Jump to solution
927 Views
liyabin
Contributor I

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);
}

Tags (2)
0 Kudos
1 Solution
703 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Li,

For UART usage on LPC23xx, you could take a look at following links:

http://www.keil.com/dd/vtr/4530/3413.htm

https://community.nxp.com/thread/446958

http://www.onarm.com/forum/18811/

https://github.com/psas/liblpc23xx/blob/master/lpc23xx-uart/lpc23xx-uart.c


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
704 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Li,

For UART usage on LPC23xx, you could take a look at following links:

http://www.keil.com/dd/vtr/4530/3413.htm

https://community.nxp.com/thread/446958

http://www.onarm.com/forum/18811/

https://github.com/psas/liblpc23xx/blob/master/lpc23xx-uart/lpc23xx-uart.c


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

703 Views
liyabin
Contributor I

Thank you!

I removed the jlink,the message is ok!

Strange problem.

0 Kudos