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/TMS320F28027: Fastest Toggle Speed

Part Number: TMS320F28027
Other Parts Discussed in Thread: LAUNCHXL-F28027

Tool/software: Code Composer Studio

Hello 

I was trying to toggle the one pin of LAUNCHXL-F28027 using these codes:

  while(1)
  {
    GPIO_setLow(myGpio, GPIO_Number_0);
    GPIO_setHigh(myGpio, GPIO_Number_0);
  }

The freq going out is around 900kHz. I am running at max speed of 60MHz.

Why is the driver together with "read-modify-write" code would take up to 30clock clycle or 30 instructions (say 1MhZ speed output from 60MHz and half the time of it toggle. 30MHz) from toggling from High to Low and vice versa?

  • Hi Victor,

    If you are using the function to toggle the GPIO then frq of toggle will depend on code optimization. You can check the assembly to see how this is compiled. To have faster toggle you can directly write into GPIO toggle register using bit field header file.

    GpioDataRegs.GPATOGGLE.bits.<bit_name> = value;

    Regards,

    Vivek Singh