Forums

RTS/CTS on UART1 - LPC2129

Started by Gazelle February 6, 2006
Hello all,
            I want to setup an LPC2129 on UART1 at high baudrates in order
to connect it with a Silicon Labs CP2102-GM RS232-2-USB2.0 Bridge (slave).
The code below is working at 234.375 bps, but I am loosing data and suspect
that it is because I do not use hardware handshaking - The CP2102-GM has a 
full functional UART interface and also LPC2129 on UART1.
So I want to activate CTS/RTS on UART1 ?
Has anyone pointers or code snippets to add to this code, as below ?
I am using Keil/GCC ...

Thank you very much !

Michel
	#include <stdio.h>         /* prototype declarations for I/O functions */
#include <LPC21xx.H>       /* LPC21xx definitions                      */
	/****************/
/* main program */
/****************/
int main (void)  {           	/* execution starts here      */
int n=0;

/* initialize the serial interface   */
  PINSEL0 = 0x00050000;       /* Enable RxD1 and TxD1       */
  VPBDIV = 0x00000001;
  U1LCR = 0x00000083;         /* 8 bits, no Parity, 1 Stop bit            */
  U1DLL = 0x00000010;         /* 234375 Baud Rate @ 15MHz VPB Clock
*/
  U1LCR = 0x00000003;         /* DLAB = 0                                 */

  while (1) {
printf ("CP2102-EK COM3 - 234375 Baud-N81 - The quick brown fox jumps over
the lazy, old dog - %d\n",n++);         
  
  } 
}
	
	

An Engineer's Guide to the LPC2100 Series