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: UART EXAMPLE CODES

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I am trying an SCI-echo back from the examples provided(Example 3 from driverlib). I have set all the settings to string-mode in my serial terminal. But still, I am getting some invalid characters at the output. Can you please help me?

Regards

Vishal

  • Hi,

    I noticed that the baud rate is getting half due to something wrong happening at device.h file.

    #define _LAUNCHXL_F28379D This statement is missing in device.h. Because of this, the Below statements are getting executed.

    #define DEVICE_OSCSRC_FREQ 20000000U

    //
    // Define to pass to SysCtl_setClock(). Will configure the clock as follows:
    // PLLSYSCLK = 20MHz (XTAL_OSC) * 20 (IMULT) * 1 (FMULT) / 2 (PLLCLK_BY_2)
    //
    #define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(20) | \
    SYSCTL_FMULT_NONE | SYSCTL_SYSDIV(2) | \
    SYSCTL_PLL_ENABLE)

    //
    // 200MHz SYSCLK frequency based on the above DEVICE_SETCLOCK_CFG. Update the
    // code below if a different clock configuration is used!
    //
    #define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 20 * 1) / 2)

    #endif

    If  " #define _LAUNCHXL_F28379D" Is included then, #define DEVICE_OSCSRC_FREQ      is set to   10000000U. 

    But I wonder if #define DEVICE_OSCSRC_FREQ          20000000U this sttement is in work then, Device sysclk freq will go to 400MHz, Then how the MCU is running?

    Regards

    Vishal

    Please check this file and let me know what other things will go wrong? 

  • Hi Vishal,

    Please add a predefined symbol - "_LAUNCHXL_F28379D" in the project properties.

    As it is mentioned in the \C2000Ware_X_XX_XX_XX\device_support\f2837xd\docs\F2837xD_DEV_USER_GUIDE.pdf

    If using a Launchpad, also add a pre-define NAME called "_LAUNCHXL_F28379D". This is required to setup the proper device clocking.

     

    Thanks,

    Katta

  • Vishal,

    For directions on how to add the predefined symbol, please see page 29, step 12 in the following workshop:

    https://training.ti.com/c2000-f2837xd-microcontroller-1-day-workshop-series

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken