This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6748: UART1 not working

Part Number: TMS320C6748
Other Parts Discussed in Thread: OMAPL138, MAX232,

Hello,

I am using LCDK6748 development board. I am evaluating the "UART_BasicExample_lcdkOMAPL138_c674xTestProject" example from pdk_omapl138_1_0_3. It is working fine with usb cable connected to UART-USB connector of LCDK6748 board and my laptop. I understand it is connected to UART2. Now I change this to UART 1 but it is not working. I explain the changes done by me.


In software:

board_cfg.h

#define BOARD_UART_INSTANCE             (1U)

In LCDK6748 board:

1.R205 is open

2. R206 is soldered

3. R208 is open

4. R209 is soldered

Connection as follows:

1. UART1_RXD ------> MAX232 (R1_OUT)

2.UART1_TXD  ---------> MAX232 (T1_IN)

3. MAX232 (R1_IN)-----> Serial connector ( Tx)

4. MAX232 (T1_OUT) -----> Serial connector (Rx)

MAX232 Vcc is connected to J15 pin number 46

MAX232 GND is connected to J15 pin number 43

Serial connector  GND is connected to J15 pin number 43

Serial connector is connected to serial to usb connector and connected to Laptop

Tera Term settings:

Circuit:

 

Now I run the program and  I see the result in tera term I could not see anything printing.

Kindly suggest me to work uart1 in LCDKC648 board.

Thanks & Regards

Navaneetha krishnan

  • Hi,

    Did you make sure you have the correct uart pinmuxed in ti/board/src/lcdkOMAPL138/lcdkOMAPL138_pinmux.c:
    /*
    * \brief Function to configure UART module pin mux
    *
    * \return None
    */
    static void Board_configUartPinMux(void)
    {
    /* enable the pinmux registers for Uart */
    hSysCfg->PINMUX4 &= (~(CSL_SYSCFG_PINMUX4_PINMUX4_31_28_MASK |
    CSL_SYSCFG_PINMUX4_PINMUX4_27_24_MASK |
    CSL_SYSCFG_PINMUX4_PINMUX4_23_20_MASK |
    CSL_SYSCFG_PINMUX4_PINMUX4_19_16_MASK));
    hSysCfg->PINMUX4 |= BOARD_PINMUX4_UART_ENABLE;
    }

    By default UART2 should be pinmuxed instead of UART1.

    Best Regards,
    Yordan
  • hello yordan,

    Thanks for your reply,

    I tried the same code with FT232RL USB TO TTL module. It is working fine.

    Connection as follows

    UART1_RXD----------->FT232RL (TX)

    UART1_TXD------------->FT232RL (RX)

    Kindly suggest why it is not working for MAX232 what could be the wrong?

    Thanks & Regards

    Navaneetha krishnan

  • Have you tried setting the uart (I mean the uart controller on the TMS320C6748 side and the teraterm settings accordingly) to different baudrate, parity, stop bits etc?
  • yes still it is not working

    Also I trying to communicate TMS320C6748 with ESP8266 wifi module through UART. The Baudrate is 115200. But it is not communicating. Very rarely it communicates for one time.

    I tried ESP8266 module with UART to USB converter it working fine with my laptop Terminal.

    Also I tried TMS320C6748 module UART1  with same UART  to USB converter it is also working fine with my laptop. In both conditions the UART settings are same.

    (Note: In both conditions I kept  the Flow control/ Handshaking as "None".  But I dont know where to put this settings in "pdk_omapl138_1_0_3" UART example.)

    With same UART setting I tried to connect TMS320C6748 UART1 with ESP8266 wifi module but it is not working.

    UART Settings as below:

     UART_Params_init(&uartParams);

       uartParams.baudRate=115200U;
        uartParams.parityType = uartParity;
        uartParams.dataLength =UART_LEN_8;
        uartParams.stopBits=UART_STOP_ONE;
        uartParams.writeMode = UART_MODE_BLOCKING;
        uartParams.readMode = UART_MODE_BLOCKING;
        uartParams.readTimeout  = UART_WAIT_FOREVER;
        uartParams.writeTimeout  = UART_WAIT_FOREVER;
        uartParams.readReturnMode=UART_RETURN_FULL;
        uartParams.writeDataMode = UART_DATA_BINARY;
       uartParams.readDataMode = UART_DATA_TEXT;

    Write Command:

    char WIFI_COMMAND[26] ;

      WIFI_COMMAND[0]= 'A';
        WIFI_COMMAND[1]= 'T';
        WIFI_COMMAND[2]= '+';
        WIFI_COMMAND[3]= 'R';
        WIFI_COMMAND[4]= 'S';
        WIFI_COMMAND[5]= 'T';
        WIFI_COMMAND[6]= '\r';
        WIFI_COMMAND[7]= '\n';

     addrDataPrint = (uint32_t)WIFI_COMMAND;

      writebytes=UART_write(uart, (void *)addrDataPrint, sizeof(WIFI_COMMAND)) ;
        if (writebytes== UART_ERROR)
        {
            goto Err;
        }
        System_printf("The UART write  %d bytes\n", writebytes);

    Read command:

    char rxBuffer[256] ;

     memset(rxBuffer, 0, sizeof(rxBuffer));
     addrScanPrompt = (uint32_t)rxBuffer;

      ret_bytes = UART_read(uart,addrScanPrompt sizeof(rxBuffer));

     System_printf("The UART read %d bytes\n", ret_bytes);

    Kindly suggest me where I am doing the mistake.

    Thanks & Regards

    Navaneetha krishnan