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.

Count external clock pulses with hardware timers CC3200

Other Parts Discussed in Thread: CC3200

I have looked through the Users Guide for the CC3200 and it does not appear that any of the timers can increment a hardware counter from an external clock.  I am trying to count external pulses and preform an interrupt e.g. every 5000 pulses. 

The interrupt part looks OK but i cannot see anyway to connecting the external clock pulse directly to the timers and using the hardware to count pulses.

The TimerCC example given looks like it calculates the frequency of two rising edge events on a defined timer pin.

Is there any way of counting external pulses using the hardware timers without having to use an interrupt for every pulse.

Any info would be appreciated.

josmchale 

  • Hi,

    Please review the paragraph 9.3.2.2 in swru367a.pdf (Technical Reference Manual) - the function needed is "input edge count mode" - the timer seems to be similar with that found on Tiva micros. In this mode you preset the number of counts to be counted and the interrupt is generated when the count is expired.

    Petrei

  • Thanks for the advice Petrei,

    I used the timer configure function from "timer.c" and input the timer capture count value as shown :(TimerConfigure(TIMERA2_BASE, TIMER_CFG_A_CAP_COUNT);)

    The timer them began counting external pulses.

    Sorry for the basic question.

    Regards,

    josmchale