2024-05-07 02:37 PM
I have TIM20 configured in reset mode and I want the output of COMP7 to reset it. I have TIM20 configured with ETR routed to COMP7 and I can see the timer being reset on both of the edges of the COMP7 signal. I only want TIM20 reset on one edge.
I'm using CubeIDE and I see options for choosing rising\falling\both for input capture, but no way to do it when routing from the internal comparators. Is this possible?
Solved! Go to Solution.
2024-05-08 09:49 AM
Yes, I saw that, but that didn't seem to do what I need. The board I'm using makes it difficult to detect if the behavior I'm seeing is due to lack of hysteresis on the COMP and input filtering on the timer...which would make noisy transitions show up as triggering on both edges.
2024-05-08 03:56 AM
Hello @KHarb.1,
check the TIMx_SMCR.ETP bit, you can use it to control the polarity of the external trigger
According to RM: "Bit 15 ETP: External trigger polarity
This bit selects whether tim_etr_in or tim_etr_in is used for trigger operations
0: tim_etr_in is non-inverted, active at high level or rising edge.
1: tim_etr_in is inverted, active at low level or falling edge"
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-08 09:49 AM
Yes, I saw that, but that didn't seem to do what I need. The board I'm using makes it difficult to detect if the behavior I'm seeing is due to lack of hysteresis on the COMP and input filtering on the timer...which would make noisy transitions show up as triggering on both edges.