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.

free running counter in 28069

Hello,

I used delfino dual

and I appreciate free running counter (64bit at 200MHz, so about 3000years of counting)

as tick (used, for example, to call a task periodically).

In 2806x this counter does not exists.

I don't want to use a periodically

interrupt where increment a counter because

in this project there are other more important interrupts.

If I use eCap peripheral as aPwm

I have 32bit counter plus 16 bit prescaler running at 90MHz,

so about 36 days of counting (that is not enough, because I need more than 5 years).

Has someone another idea ?

 

  • Hi Mauro,

    I think you could have the eCAP's APWM (with some duty cycle) output its waveform to a eQEP-A of an unused eQEP module set up to count pulses.  The eQEP can be configured to send an interrupt after so many pulses are counted.  You'd need to set the eQEP in direction-count mode and tie the eQEP-B pin to GND or VDDIO.  The connection between eCAP and eQEP would have to happen outside the chip, so you'd need to use two physical GPIO pins to do this. 

    With this setup, I believe you should be able to generate a timer that can count 2^48 bits (32bits from the eCAP and 16bits from the eQEP).

    I haven't tried any of what I mention above, but I believe it should be feasible.


    Thank you,
    Brett