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: CCS/TMS320F28379D/28379D Launchpad sci echoback example bug

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

1. The SCI GPIO pin configuration in the C code (/sci_echoback_cpu01/Example_2837xDSci_Echoback.c) is wrong. 

The code in the block comment is the original, the code below is corrected one which is working in the expected way. 

See pp. 960 of 'SPRUHM8I–December 2013–Revised September 2019' for the reason why the original code is wrong. 

/*

GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
*/

GPIO_SetupPinMux(43, GPIO_MUX_CPU1, 15);
GPIO_SetupPinOptions(43, GPIO_INPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(42, GPIO_MUX_CPU1, 15);
GPIO_SetupPinOptions(42, GPIO_OUTPUT, GPIO_ASYNC);

2. The baud rate of serial terminal (e.g., Putty) must be set to 4800, not 9600. 

It is due to the PLL setup code of the example. Here is the code from 'F2837xD_SysCtrl.c'

#ifdef _LAUNCHXL_F28379D
InitSysPll(XTAL_OSC,IMULT_40,FMULT_0,PLLCLK_BY_2);
#else
InitSysPll(XTAL_OSC, IMULT_20, FMULT_0, PLLCLK_BY_2);
#endif // _LAUNCHXL_F28379D

Unless the '_LAUNCHXL_F28379D' is defined in the CCS project, the chip on the kit, 28379D, would run 100 MHz, not 200 MHz.

Consequently, the SCI parameter setting in the example would make the speed 4800 bps, not 9600 bps. 

Once all the changes are correctly made, here is what you would be able to see:

  

The FTDI Serial port was detected as COM4, when I tested the code. 

  • Hi In-kwon,

    The examples in the C2000ware are written for the controlcard which has different set of gpios and XTAL configurations .

    The examples need to be updated for them to work with the lauchpad.

    Please refer to C2000Ware\device_support\f2837xd\docs\F2837xD_DEV_USER_GUIDE.pdf

    • Pg 25:

    "If using a Launchpad, also add a pre-define NAME called "_LAUNCHXL_F28379D". This is required to

    setup the proper device clocking."

    • Section : 2.5 Troubleshooting -> "I’m using a Launchpad and my device clocking is incorrect"

    • Pg 71 or 5 CPU 1 Bit-field Example Applications -> intro of all the Example Applications

    The examples provided are built for controlCARD compatibility. For LaunchPad use, some

    minor modifications may be required.
    If using a Launchpad, add a pre-defined symbol within the project properties called
    "_LAUNCHXL_F28379D". This is required to setup the proper device clocking.

    Regards.