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.

timer question

I'm new to the Tiva processors, so bear with me.    I'd like to know if the following is feasible using the timer hardware

On an input edge:

1) capture a time AND

2) trigger a one-shot timer tied to an outpu

Obviously (1) is a normal timer mode, but I don't see how to do (2).  I've  read about timer chaining, but it doesn't seem that input capture is one of the events that could be used to trigger a following timer.

Geoffrey

  • Hi, 

    Try the simplest first:

    1) capture the edge and then in its interrupt...

    2) start the one-shot timer and in its interrupt manage the GPIO output

    Then refine this, a better solution may be found.

    Petrei

  • Geoffrey,

    The Timer Daisy Chain is valid for one-shot, periodic and PWM Modes only in TIVA.

    So typically doing this with a Time Capture and Using Timer Daisy chain to trigger a one-shot time tied to an output may not work. A software code involving GPIO Interrupt from the same input edge to start a one shot timer would be an easily workable.

    Amit

  • Geoffrey Brown said:
    Obviously (1) is a normal timer mode, but I don't see how to do (2).  I've  read about timer chaining, but it doesn't seem that input capture is one of the events that could be used to trigger a following timer.

     The event trigger is close to the input edge in term of cpu clock? If not you can manage on capture trigger interrupt, read the time of capture then add the time ticks needed to fire the output event and load to compare timer, if needed then manage the second event on IRQ out service again loading a new time tick to what need the output.

     I am not sure this is clear, have you previously used a timer capture compare? If not please ask again detail you need.

  • Amit Ashara said:

    The Timer Daisy Chain is valid for one-shot, periodic and PWM Modes only in TIVA.

     The timer Daisy chain is not intended to extend to 64 bit the timer TAR counter register?

     PWM as I read is 16 bit wide how can work on daisy chain?

     This is from my reading of data sheet of TIVA, am I correct?

  • I think the answers basically get at the root of my question.  The Tiva timers are new to me, but I've used timers on many other processors over the years.  Of course they all have different features.

    The gist of the answers is that I'll have to invoke software through an interrupt to achieve my goal.  I was hoping for  a more direct hardware solution, but that's life. 

    As a point of reference, there are cortex based processors which can do what I was asking about -- input event is both captured and triggers (without software intervention) another hardware timer.

    Geoffrey

  • Geoffrey Brown said:
    As a point of reference, there are cortex based processors which can do what I was asking about -- input event is both captured and triggers (without software intervention) another hardware timer.

     Hi Geoffrey, this can be done on C2000 series without intervention of processor as shut down PWM on event, I am not knowing in deep TIVA timers but from data sheet I see nothing. Firing uDMA to load compare can be a solution, I am not sure this can work and need some test on the field, I am quite sure CB1 or Petrej share more knowledge to answer your question but I fear no other solution than software are available.

  • @Roberto

    The wait on trigger and daisy chain are the same thing.It does not extend a 32-bit timer into a 64-bit timer and your interpretation is correct indeed. Also a trigger is defined as an event which could be MATCH event for PWM mode from one sub timer to another sub-timer.

    Amit