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/TMS320F28069: ControlSuite F2806x_CpuTimers.c

Part Number: TMS320F28069


Tool/software: Code Composer Studio

The function ConfigCpuTimer() in the file of F2806x_CpuTimers.c, 

PeriodInClocks = (long) (Freq * Period);

Should it cast to Unit32 instead of long?

  • Hi Andy,

    The size of PeriodinClocks is the same since a long is 32bits and it should not have any effect on the result.You are right in that the result of the product should have been cast to a Uint32. I'll file a bug to get this changed. For more information on data types you can check the compiler's user's guide.

    www.ti.com/.../spru514k.pdf

    Regards,
    Ozino
  • According to the header file, Uint32 is unsigned long

    typedef unsigned long   Uint32;

    The only difference is the positive range of long only goes to 2^31-1 instead of 2^32-1.  I doubt Freq*Period would be that big of a number to matter.