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.

How to select 64 bit timer CC3200

Other Parts Discussed in Thread: CC3200

I need a timer 3 minutes long and I saw in SDK examples a 32 bit timer is used.

How can I change it?


I had a look in timer.h timer.c timer_if.h and timer_if.c but I did not understand how to do it.

I think I should use some parameter when I create and initialize my timer but I didn't got it.

Can anyone help?

  • Maris,

    CC3200 General-Purpose Timer Module (GPTM) contains 16/32-bit GPTM blocks. Each 16/32-bit GPTM block provides two 16-bit timers/counters (referred to as Timer A and Timer B) that can be configured to operate independently as timers or event counters, or concatenated to operate as one 32-bit timer.

    So, you need to build a logic around the 32 bit timer for counting 3 mins - Ex: a periodic timer of 30s times 6.

    -/Praneet
  • I don't understand this block of code (timer_if.c)

    void Timer_IF_Init( unsigned long ePeripheral, unsigned long ulBase, unsigned
                   long ulConfig, unsigned long ulTimer, unsigned long ulValue)
    {
        //
        // Initialize GPT A0 (in 32 bit mode) as periodic down counter.
        //
        MAP_PRCMPeripheralClkEnable(ePeripheral, PRCM_RUN_MODE_CLK);
        MAP_PRCMPeripheralReset(ePeripheral);
        MAP_TimerConfigure(ulBase,ulConfig);
        MAP_TimerPrescaleSet(ulBase,ulTimer,ulValue);
    }

    It seems that there is a way to set 64 bit mode with a single parameter (this is what I get from comment above in the code)

  • Maris, As I said earlier, you could operate each GPTM as two 16 bit timers or concatenate them as one 32 bit timer. Sorry if the comment is misleading (though not sure how.!), but it cannot be configured in 64 bit mode.

    -/Praneet