cancel
Showing results for 
Search instead for 
Did you mean: 

G431 - reset counter and prescaler on input capture

Tobe
Senior III

Is there a way to reset the counter and the prescaler via a hard event or something when an input capture happens?

I use timer 1 to have a hall interface and to drive timer 8. But there are some fluctuations, because the interrupt (where i reset counter and prescaler) is not fired at the exact time as the input capture happens.

1 ACCEPTED SOLUTION

Accepted Solutions

> Is there a way to reset the counter and the prescaler via a hard event or something when an input capture happens?

No; but you can set input capture and TRGI to the same source (or you can set input capture upon TRGI), and then use the slave-mode controller:

waclawekjan_0-1713452801185.png

JW

View solution in original post

2 REPLIES 2

> Is there a way to reset the counter and the prescaler via a hard event or something when an input capture happens?

No; but you can set input capture and TRGI to the same source (or you can set input capture upon TRGI), and then use the slave-mode controller:

waclawekjan_0-1713452801185.png

JW

I would not consider this as a "no", since it actually works ;)