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/TMS320F28377S: C2000

Part Number: TMS320F28377S


Tool/software: Code Composer Studio

Hi All,

I am using TMS320F28377S for my application.

I tried with GPIO example code in C2000 ware. Code build without any error and it will loaded to My launchpad, the program runs without any problem.

I want to know what is the my Processor Speed..??, Because i need high speed execution above 150 Mhz.

I am using LAUNCHXL-F28377S Launchpad with CCS7.3 IDE.

I posted my code below in that i am configured two led's. In my main file the loop takes more 1000ms to complete. 

Why this delay..?? actually if controller run its maximum speed its a small delay < 250ms.

The external oscillator is 10MHz.

Yuvaraj.

My code below


#include "F28x_Project.h" // Device Headerfile and Examples Include File
#include "F2837xS_adc.h"
#include "F2837xS_Gpio_defines.h"
#include "F2837xS_device.h"


unsigned short int j,a;

void main(void)
{
InitSysCtrl();

InitGpio();
GPIO_SetupPinMux(13, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(13, GPIO_OUTPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(12, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(12, GPIO_OUTPUT, GPIO_PUSHPULL);

DINT;
InitPieCtrl();

IER = 0x0000;
IFR = 0x0000;

InitPieVectTable();

EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM

for(;;)
{
// Turn on LED
GPIO_WritePin(13, 0);
GPIO_WritePin(12, 1);


for(j = 0; j < 10000; j++)
{
for(a = 0; a < 100; a++)
{

}
}

// Turn off LED
GPIO_WritePin(13, 1);
GPIO_WritePin(12, 0);
for(j = 0; j < 10000; j++)
{
for(a = 0; a < 100; a++)
{

}
}

// Delay for a bit.
}
}

  • Hi,

    Have you enabled any optimizations in your CCS project?
    Even though the driverlib function GPIO_WritePin is an inline function, it is not really "inlined" in zero optimization. It still acts as a normal functions and this causes additional latency because of code branches. The function also includes some math to figure out which register to be updated
    You can try enabling the optimization (O2) or try accessing the register directly instead of using functions

    Thanks and Regards,
    Veena
  • Okay i will try