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.

TMDSRM48USB development kit interfacing with MSP430G2553

Other Parts Discussed in Thread: MSP430G2553, HALCOGEN

Hello,
I am running sample program of SCI UART example on RM48USB kit successfully. I am receiving some data on CAN and sending the received data on hyperterminal. I am able to see the data correctly.
Now I have connected NHET[6] of RM48->TXD of MSP430G2553 and NHET[13] of RM48->RXD of MSP430G2553.
I am not able to see the data on MSP430 because I am displaying data received on RXD of MSP430 over LCD. The LCD is working fine. I am running successfully the program on MS430G2553 to display characters on LCD passed from Hyperterminal. 
I have doubt on pin muxing of RM48USB.
Please help me.

Thanks in advance. 

  • NHET[6] and NET[13] are muxed with the SCI module. The USB UART uses the LIN module in SCI mode. They are different modules. Please check the datasheet and TRM for more details.

    Thanks and regards,

    Zhaohong
  • Thank you Zhaohong for your quick reply.

    Can you please guide me, how to access the LIN_TX and LIN_RX pins ?
    I am not able to figure out, where are these pins located ?
    If possible please give links to understand the concepts.
    I want to transmit the received data on DCAN1 port to UART as well as on LIN_RX and LIN_TX.
    I have connected the cables from LIN_TX (RM48USB)-> RXD(MSP430G2553) & LIN_RX (RM48USB)-> TXD(MSP430G2553) to display the data on LCD interfaced to MSP430G2553.
  • LIN pins are not brought out to the connectors. You can setup the SCI module in the same way as the LIN module.

    Thanks and regards,

    Zhaohong
  • Dear Zhaohong

    With the HALCoGen I created project. After that I disabled all drivers and has selected SCI.
    The I have generated code.
    In the code composer studio, I created same project with following code. I was not able to receive any characters on NHET1[13] of RM48USB.
    My sys_main.c is following

    /** @file sys_main.c
    * @brief Application main file
    * @date 15.July.2015
    * @version 04.05.00
    *
    * This file contains an empty main function,
    * which can be used for the application.
    */

    /*
    * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com
    *
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    *
    */


    /* USER CODE BEGIN (0) */
    #include "sys_common.h"
    #include "sys_core.h"
    #include "system.h"
    #include "sci.h"

    /* USER CODE BEGIN (1) */
    //stores user character
    #define TSIZE1 10
    uint8 TEXT1[TSIZE1]= {'H','E','R','C','U','L','E','S',' ',' '};
    #define TSIZE2 18
    uint8 TEXT2[TSIZE2]= {'M','I','C','R','O','C','O','N','T','R','O','L','L','E','R','S',' ',' '};
    #define TSIZE3 19
    uint8 TEXT3[TSIZE3]= {'T','E','X','A','S',' ','I','N','S','T','R','U','M','E','N','T','S','\n','\r'};

    /* USER CODE END */

    /** @fn void main(void)
    * @brief Application main function
    * @note This function is empty by default.
    *
    * This function is called after startup.
    * The user can use this function to implement the application.
    */

    /* USER CODE BEGIN (2) */
    void sciDisplayText(sciBASE_t *sci, uint8 *text, uint32 length);
    void wait(uint32 time);

    /* USER CODE END */

    void main(void)
    {
    /* USER CODE BEGIN (3) */
    _enable_interrupt_();
    sciInit();
    sciDisplayText(scilinREG,&TEXT1[0],TSIZE1); /* send text code 1 */
    while(1) /* continious desplay */
    {
    // sciDisplayText(scilinREG,&TEXT1[0],TSIZE1); /* send text code 1 */
    // sciDisplayText(scilinREG,&TEXT2[0],TSIZE2); /* send text code 2 */
    // sciDisplayText(scilinREG,&TEXT3[0],TSIZE3); /* send text code 3 */
    wait(200);
    };
    /* USER CODE END */
    }

    /* USER CODE BEGIN (4) */
    void sciDisplayText(sciBASE_t *sci, uint8 *text,uint32 length)
    {
    while(length--)
    {
    while ((scilinREG->FLR & 0x4) == 4); /* wait until busy */
    sciSendByte(scilinREG,*text++); /* send out text */
    };
    }


    void wait(uint32 time)
    {
    time--;
    }
    /* USER CODE END */
  • You need to configure the PINMUX module to enable SCI function on those two pins. Then you can use a scope to see if any data coming out of the tx pin. To confirm if the PINMUX is configured correctly, you can first set up the SCI pins for GIO outputs and check if writing to the SCI register (see TRM) can change the pin state.

    Thanks and regards,

    Zhaohong

  • Hi Zhaohong

    I tried to configure PINMUX module. I enabled SCITX from PINMUX module and has selected "Enable SCI driver" instead of Enable SCI2 driver.
    I am using the example given in HALCoGen " example_sci_uart_9600"
    The program is staying forever at while ((scilinREG->FLR & 0x4) == 4); /* wait until busy */
    In the function "void sciDisplayText(sciBASE_t *sci, uint8 *text,uint32 length)"

    I am not able to figure out further step.
  • I took a look at your post again. You actually still use the LIN module instead of the SCI module. In the code generated by Halcogen, the SCI module is pointed by sciREG. Please take a look at sci.c generated by halcogen.

    Thanks and regards,

    Zhaohong
  • Hi
    Thanks for reply.
    What should be written for sci module if sciREG is wrong ?
  • Hi
    I have made following selections in HALCoGen in pinmux:
    N2-> SCITX
    W3-> SCIRX
    I have also enabled only SCI driver in Driver Enable of HALCoGen
    and I have modified the code to following, but stll not able to receive any character on RX pin of MSP430 connected to NHET1[13] pin of RM48.


    /* USER CODE BEGIN (0) */
    #include "sys_common.h"
    #include "sys_core.h"
    #include "system.h"
    #include "sci.h"
    #include "pinmux.h"

    /* USER CODE BEGIN (1) */
    //stores user character
    #define TSIZE1 10
    uint8 TEXT1[TSIZE1]= {'H','E','R','C','U','L','E','S',' ',' '};
    #define TSIZE2 18
    uint8 TEXT2[TSIZE2]= {'M','I','C','R','O','C','O','N','T','R','O','L','L','E','R','S',' ',' '};
    #define TSIZE3 19
    uint8 TEXT3[TSIZE3]= {'T','E','X','A','S',' ','I','N','S','T','R','U','M','E','N','T','S','\n','\r'};

    /* USER CODE END */

    /* USER CODE BEGIN (2) */
    void sciDisplayText(sciBASE_t *sci, uint8 *text, uint32 length);
    void wait(uint32 time);

    /* USER CODE END */

    void main(void)
    {
    /* USER CODE BEGIN (3) */
    _enable_interrupt_();
    sciInit();
    muxInit();
    while(1) /* continious desplay */
    {
    sciDisplayText(scilinREG,&TEXT1[0],TSIZE1); /* send text code 1 */
    wait(2000);
    };
    /* USER CODE END */
    }

    /* USER CODE BEGIN (4) */
    void sciDisplayText(sciBASE_t *sci, uint8 *text,uint32 length)
    {
    while(length--)
    {
    while ((sciREG->FLR & 0x4) == 4); /* wait until busy */
    sciSendByte(scilinREG,*text++); /* send out text */
    };
    }


    void wait(uint32 time)
    {
    time--;
    }
    /* USER CODE END */
  • you are still writing to the LIN module.

    "sciSendByte(scilinREG,*text++); /* send out text */"

    Thanks and regards,

    Zhaohong