This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UARTO problem in LPC2378

hai!

i am doing a project where i used LPC2378 controller,When i handle UARTO,i found some strange problem.When i want to write 26bytes of data continously for every 20msec,in the serial port it shows me garbage data.

My Code:

buf[30] = {0x01,0x02......0x03};

for(i=0;i<26;i++) UART_send(buf[i]);

when i want to see the data at the Hyper terminal,its not the buffer data which i was send.

Pls guide me to solve the problem.

void UART_Init()
{ PINSEL0 |= 0x00000050; // Enable TxD0 P0.2; RxD0 P0.3

U0LCR = 0x83; // 8 bits, no Parity, 1 Stop bit Fdiv = ( Fpclk / 16 ) / baudrate ; // baud rate U0DLM = Fdiv / 256; U0DLL = Fdiv % 256; U0LCR = 0x03; // DLAB = 0 U0FCR = 0x06; // Enable and reset TX and RX FIFO.

if(install_irq( UART0_INT, (void *)Uart0Handler, HIGHEST_PRIORITY ) == FALSE) { return (0); }

U0IER = IER_RBR | IER_THRE | IER_RLS; // Enable UART0 interrupt

}

0