2019-06-03 02:06 PM
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
Solved! Go to Solution.
2019-06-04 03:57 AM
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
2019-06-03 02:25 PM
In my message the wave form are illegible : so i draw a new figure :
S : t6 (high to low) = T : t1 (low to high) + custom delay
S : t9 (low to high) = D : t9 (low to high)
lidiriel
2019-06-04 03:57 AM
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
2019-06-07 01:56 AM
thanks a lot it's work.