Ardoster

Linking an serial port to an uart

Discussion created by Ardoster on Sep 8, 2009
Latest reply on Sep 13, 2009 by Ardoster

Hi

 

I'm trying to linking a serial port to the Uart 2 of my M52259Demokit. To do this, I'm using an USB-Serial converter that I've linked to the pins of the Uart 2. The problem is that I'm commiting any error because my application can't read or write this new Uart. I will explain you step by step all my efforts:

 

1. Reading in the documentation about M52259Demokit, I've found that the Uart2 is mapped in the ports 3, 9 and 11 (no flow control) of J4 in the M52252DemoCom board.

2. My USB-Serial converter dispose 6 pins. I've connected 3 of its pins following this schema:

Tx Usb-Serial - Pin Urxd2 (RX Uart)

Rx Usb-Serial - Pin Utxd2 (TX Uart)

GND Usb-Serial - Pin GND Uart

3. I've opened two hyperterminals. The first connected to the Uart 0 (the serial port which includes the board), and to my USB-Serial port, using one of my computer's usb ports.

4. To test my connection, i've created a new project, and in the main application I've created an application which makes an echo in the serial port. The code, is something like this.

 

uart_init (2,  SYSTEM_CLOCK_KHZ, baudRate);

 

while (1){

      c=uart_getchar(2);

      uart_putchar(2,c);

}

Of course, my application runs correctly using the uart 0, but doesn't run using the uart 2. 

 

Could you help me? Do you have any suggestion? I'm guessing that it's probably that, althought my application is correct, I haven't configured correctly the uart ports, because these ports are shared with another functions, like the CAN port, but reviewing my code, and my connections, I can't see where's my error.

 

Could you help me please???? I'm despereting!

 

Thanks you in advance

Outcomes