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.

TMS320F28075: Minimum frequency for CPU timer?

Part Number: TMS320F28075


Dear Champs,

I am asking this for our customers. 

Does the 32-bit CPU timer has minimum frequency limitations?

if so, how do we calculate it?

Wayne Huang

  • Wayne,

    Accoriding to spruhm9f, CPU-Timer0 and CPU-Timer1 run off of SYSCLK. CPU-Timer2 normally runs off of SYSCLK, but can also use INTOSC1, INTOSC2, XTAL, and AUXPLLCLK. So i would say its limitations are tied to that of SYSCLK. I'll copy the Apps expert to further comment on this issue.

    Regards,

    Ozino

  • Hi Wayne,

    Ozino is correct CPU Timers 0/1 run off SYSCLK, but CPU Timer 2 can use INTOSC1, INTOSC2, XTAL, or AUXPLLCLK.

    The different clock options are described below (from the datasheet):

    INTOSC1/INTOSC2 are both 10MHz internal oscillators.

    For XTAL (reference table below from datasheet) if you use an external crystal or resonator between X1/X2 then the minimum frequency is 10MHz. However, if you use a single ended clock connected to X1 then the minimum frequency you could achieve is 2MHz.

    The same could be said about the AUXCLKIN frequency (minimum=2MHz).  Note though that if USB functionality is needed, the auxiliary clock (AUXPLLCLK) must be configured to produce 60 MHz. In which case you could have Timer 2 be sourced from XTAL-> Single ended clock connected to X1 which has a minimum frequency of 2MHz.

    Best Regards,

    Marlyn

  • Dear Marlyn,

    Based on what you said above, the longest period the CPU timer can support should be:

    (1/SYSCLK) * CPU timer prescaler * 2^32 (32-bit counter)

    And the SYSCLK can be as low as 2 MHz.

    Is our understanding right?

    Wayne Huang

  • Wayne,

    The calculations for the timer period are as shown below, (found in the ConfigCpuTimer function)

    Uint32 temp;
    
        //
        // Initialize timer period:
        //
        Timer->CPUFreqInMHz = Freq;
        Timer->PeriodInUSec = Period;
        temp = (long) (Freq * Period);
    
        //
        // Counter decrements PRD+1 times each period
        //
        Timer->RegsAddr->PRD.all = temp - 1;

    The maximum value you can load to the PRD register (32-bit register) is 0xFFFFFFFF. You can back track and figure out what Period value to pass in given the clock selection you choose (2MHz is the lowest) and based on the prescale values you configure.

    Best Regards,

    Marlyn