Skip to main content
con3
Senior
January 16, 2018
Solved

Trigger input capture every 8 rising edges

  • January 16, 2018
  • 1 reply
  • 922 views
Posted on January 16, 2018 at 16:42

Hey everyone,

I'm using the stm32f722ze and CubeMx and have gotten my input capture working. Essentially, when every rising edge is detected, the timer triggers a DMA event and stores the GPIO pins value to memory. This happens on every rising edge, although I'd like this to only occur every 8 rising edges. Is there anyway that I can get the input capture to be triggered every 8 rising edges instead of every rising edge?

Thanks in advance for any help!

#nucleo-stm #cubemx #timer-interrupts #input-capture-mode #stm32f7-timer
This topic has been closed for replies.
Best answer by Tesla DeLorean
Posted on January 16, 2018 at 16:44

Yes, use the Input Prescaler, which can be set to 1, 2, 4 or 8

1 reply

Tesla DeLorean
Guru
January 16, 2018
Posted on January 16, 2018 at 16:44

Yes, use the Input Prescaler, which can be set to 1, 2, 4 or 8

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
con3
con3Author
Senior
January 16, 2018
Posted on January 16, 2018 at 16:46

Hi Clive, thank you. I did add the prescaler to the code and set it to 8, although it still triggered on every event. I'll debug for a bit as I m pretty sure I must have an error somewhere.

Thank you for the quick reply