cancel
Showing results for 
Search instead for 
Did you mean: 

How can you parameter a timer with two trigger on two separate input channel ?

lidiriel
Associate II

I have two signal T and D like :

           ____

T ________|    |__________________

          t1   t2

                      _________

D _____________________________________|         |__________ 

                                       t3        t4

Is it possible to get the next wafeforme S with connect T on input

channel 1 and D on input channel 2 of a timer ?

S ______________________                   _______________

                        |________________|

                       ti               tf

ti = t1 + custom delay

tf = t3

i think is not possible but perhaps there are a correct timer configuration for this use case.

I can use GPIO and interruption but i would like operate very fast.

thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Use one of the Advanced timers.

For the T-to-S delay, use the retriggerable OPM mode, as described in RM, setting ARR so that it covers the longest required pulse on S (and of course set the appropriate polarity of output pulse, either by selecting the appropriate PWM mode, or using TIMx_CCER.CCxP),

For the D-to-S reset, use the TIMx_ETR pin/signal, as outlined in the Clearing the OCxREF signal on an external event subchapter, through setting TIMx_CCMRy.OCxCE.

JW

View solution in original post

3 REPLIES 3
lidiriel
Associate II

In my message the wave form are illegible : so i draw a new figure :0690X000008i9kdQAA.png

S : t6 (high to low) = T : t1 (low to high) + custom delay

S : t9 (low to high) = D : t9 (low to high)

lidiriel

Use one of the Advanced timers.

For the T-to-S delay, use the retriggerable OPM mode, as described in RM, setting ARR so that it covers the longest required pulse on S (and of course set the appropriate polarity of output pulse, either by selecting the appropriate PWM mode, or using TIMx_CCER.CCxP),

For the D-to-S reset, use the TIMx_ETR pin/signal, as outlined in the Clearing the OCxREF signal on an external event subchapter, through setting TIMx_CCMRy.OCxCE.

JW

lidiriel
Associate II

thanks a lot it's work.