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.

TMS320F28027F: Instruction cycle delay

Part Number: TMS320F28027F

Hi all,

   When I dumping my program in RAM memory through RAM link file, it takes 140ns to complete the instruction. But when I upload my program in flash memory through generic flash file, it takes 1.5 micro seconds to complete the instruction. 

Please give some idea to reduce the instruction cycle delay while I upload my program in flash memory.

And I am using 60 MHZ clock, it is possible to work in 120 MHZ clock.

Please respond.

Thanks,

Aslam

  • Here is the snippet of my code:

    if ((GpioDataRegs.GPADAT.bit.GPIO12 == 0) && (GpioDataRegs.GPADAT.bit.GPIO29 == 0))
    {
    GpioDataRegs.GPACLEAR.bit.GPIO6 = 1;
    GpioDataRegs.GPASET.bit.GPIO7 = 1;
    }
    else if ((GpioDataRegs.GPADAT.bit.GPIO12 == 1) && (GpioDataRegs.GPADAT.bit.GPIO29 == 0))
    {
    GpioDataRegs.GPASET.bit.GPIO6 = 1;
    GpioDataRegs.GPASET.bit.GPIO7 = 1;
    }

    else if ((GpioDataRegs.GPADAT.bit.GPIO12 == 1) && (GpioDataRegs.GPADAT.bit.GPIO29 == 1))
    {
    GpioDataRegs.GPASET.bit.GPIO6 = 1;
    GpioDataRegs.GPACLEAR.bit.GPIO7 = 1;
    }
    else if ((GpioDataRegs.GPADAT.bit.GPIO12 == 0) && (GpioDataRegs.GPADAT.bit.GPIO29 == 1))
    {
    GpioDataRegs.GPASET.bit.GPIO6 = 1;
    GpioDataRegs.GPASET.bit.GPIO7 = 1;
    }

    what I am actually trying is  reading  two pwm outputs through GPIO12 and GPIO29 and based on their states, I am changing state of  GPIO6 and GPIO7.

    But output getting from GPIO6 and GPIO7 are delayed by 4 micro seconds. So for the higher pwm frequency (100khz), I am only getting high state from GPIO6 and GPIO7.

    But the same program is working, when I upload the program in RAM memory (giving output with a delay of 500-900ns which is negligible).

    When I upload the program in flash memory, It fails.

    please give me a solution.

    Thanks,

    Aslam

  • Hi Aslam,

    Please see the FAQ linked below. You may need to check the flash wait states set or configure time critical code to run from RAM.

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/759912

    Mohamed Aslam1 said:
    And I am using 60 MHZ clock, it is possible to work in 120 MHZ clock.

    The F28027 device has a 60 MHz max clock frequency.

    Best,

    Kevin