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.

CCS/TMS320F28379D: SCI A com port not showing any data in terminal

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi all

I am trying some SCI models in simulink, it don't show any data in terminal, even the shipped in example too don't show any data, can any one give some help?

untitled.zip

  • Can you try the sci echoback examples in C2000Ware?

    What hardware are you using? The controlCARD?

    Regards,
    sal
  • Launchxl F28379D

    I have tried  sci echoback examples in C2000ware too without any sucess

  • Serial communication pins are different on launchpad from controlCard.

    Please change from GPIOs 84/85 to 28/29.

    sal
  • I didnt changed the GPIO pins, in the c2000ware sci code itself have comment to connect  28/29 and its confirmed by the code

    so we can directly connect without changing anything, isnt it?

    The three configuration switches on board is pulled to ON ON ON, is it correct? 

  • Try GPIO 84/85. Those may be the correct pins. You can also check the schematics to see which pins your board uses to connect to the FTDI chip.

    sal
  • From schematic it is 42 / 43 changed to the same and tested, now also the same result
  • You should be using GPIO 84/85.

    Please try the below code to configure your GPIOs.

    //
    // GPIO85 is the SCI Rx pin.
    //
    GPIO_setMasterCore(85, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_85_SCIRXDA);
    GPIO_setPadConfig(85, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(85, GPIO_DIR_MODE_IN);
    GPIO_setQualificationMode(85, GPIO_QUAL_ASYNC);

    //
    // GPIO84 is the SCI Tx pin.
    //
    GPIO_setMasterCore(84, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_84_SCITXDA);
    GPIO_setPadConfig(84, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(84, GPIO_DIR_MODE_OUT);
    GPIO_setQualificationMode(84, GPIO_QUAL_ASYNC);

    sal
  • Got an error in compilation

    Compilation failure
    subdir_rules.mk:7: recipe for target 'Example_2837xDSci_Echoback.obj' failed
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 148: warning #225-D: function "GPIO_setMasterCore" declared implicitly
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 148: error #20: identifier "GPIO_CORE_CPU1" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 149: warning #225-D: function "GPIO_setPinConfig" declared implicitly
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 149: error #20: identifier "GPIO_85_SCIRXDA" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 150: warning #225-D: function "GPIO_setPadConfig" declared implicitly
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 150: error #20: identifier "GPIO_PIN_TYPE_STD" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 151: warning #225-D: function "GPIO_setDirectionMode" declared implicitly
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 151: error #20: identifier "GPIO_DIR_MODE_IN" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 152: warning #225-D: function "GPIO_setQualificationMode" declared implicitly
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 152: error #20: identifier "GPIO_QUAL_ASYNC" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 158: error #20: identifier "GPIO_84_SCITXDA" is undefined
    "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback.c", line 160: error #20: identifier "GPIO_DIR_MODE_OUT" is undefined
    7 errors detected in the compilation of "C:/Users/Anoop/workspace_v6_2/f2837xd/examples/cpu1/sci_echoback/cpu01/Example_2837xDSci_Echoback
  • that code would work with the driverlib example for SCI echoback in C2000Ware. I suggest using the driverlib examples in C2000Ware.

    sal
  • Hi Sai,


    I tried i see now the same garbage data . Here is my code for reference:

    void main(void)
    {
    uint16_t receivedChar;
    unsigned char *msg;

    //
    // Configure PLL, disable WD, enable peripheral clocks.
    //
    Device_init();

    //
    // Disable pin locks and enable internal pullups.
    //
    Device_initGPIO();

    //
    // GPIO85 is the SCI Rx pin.
    //
    GPIO_setMasterCore(85, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_85_SCIRXDA);
    GPIO_setPadConfig(85, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(85, GPIO_DIR_MODE_IN);
    GPIO_setQualificationMode(85, GPIO_QUAL_ASYNC);

    //
    // GPIO84 is the SCI Tx pin.
    //
    GPIO_setMasterCore(84, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_84_SCITXDA);
    GPIO_setPadConfig(84, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(84, GPIO_DIR_MODE_OUT);
    GPIO_setQualificationMode(84, GPIO_QUAL_ASYNC);

    //
    // Initialize interrupt controller and vector table.
    //
    Interrupt_initModule();
    Interrupt_initVectorTable();

    //
    // Initialize SCIA and its FIFO.
    //
    SCI_performSoftwareReset(SCIA_BASE);

    //
    // Configure SCIA for echoback.
    //
    SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 |
    SCI_CONFIG_STOP_ONE |
    SCI_CONFIG_PAR_NONE));
    SCI_resetChannels(SCIA_BASE);
    SCI_resetRxFIFO(SCIA_BASE);
    SCI_resetTxFIFO(SCIA_BASE);
    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
    SCI_enableFIFO(SCIA_BASE);
    SCI_enableModule(SCIA_BASE);
    SCI_performSoftwareReset(SCIA_BASE);

    #ifdef AUTOBAUD
    //
    // Perform an autobaud lock.
    // SCI expects an 'a' or 'A' to lock the baud rate.
    //
    SCI_lockAutobaud(SCIA_BASE);
    #endif

    //
    // Send starting message.
    //
    msg = "\r\n\n\nHello World!\0";
    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 17);
    msg = "\r\nYou will enter a character, and the DSP will echo it back!\n\0";
    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 62);

    for(;;)
    {
    msg = "\r\nEnter a character: \0";
    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 22);

    //
    // Read a character from the FIFO.
    //
    receivedChar = SCI_readCharBlockingFIFO(SCIA_BASE);

    //
    // Echo back the character.
    //
    msg = " You sent: \0";
    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 13);
    SCI_writeCharBlockingFIFO(SCIA_BASE, receivedChar);

    //
    // Increment the loop count variable.
    //
    loopCounter++;
    }
    }



    Here is my putty session settings:


    COM5, 9600, 8 , 1 , NONE. NONE.

    Thanks,
    Looking forward for your response.
  • I am trying to rectify the error during compiling

    from the schematic of the launchpad, the sci pins are 42/43, I am attaching the scre enshot

  • The examples are based on control card. I am also having a little trouble running the example program for sci. See the schematics of your launchpad and change GPIO mux options for it. Also go through the baud rate generation calculation.
  • Now its working, 42/43 was the correct GPIO
  • Very good. Sorry for the confusion.

    sal
  • Its OK, but thanks for the time for supporting me

    Regards
  • I was unaware this hardware had been changed. We will take note of this for future support and future examples.

    sal