G431 - reset counter and prescaler on input capture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-18 4:09 AM
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.
Solved! Go to Solution.
- Labels:
-
STM32G4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-18 8:08 AM
> 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:
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-18 8:08 AM
> 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:
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-18 9:32 AM
I would not consider this as a "no", since it actually works ;)
