2018-01-16 07:42 AM
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-timerSolved! Go to Solution.
2018-01-16 07:44 AM
Yes, use the Input Prescaler, which can be set to 1, 2, 4 or 8
2018-01-16 07:44 AM
Yes, use the Input Prescaler, which can be set to 1, 2, 4 or 8
2018-01-16 08:46 AM
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
2018-01-17 11:40 PM
Good day Clive,
I got the prescaler working, although it has a slight issue. I just wanted to ask if there was a easy solution without manipulating it with additional code that ignores and bloats the software.
The timer is triggered immediately and then every 8 clock cycles thereafter. I'd ideally like it to not have the initial trigger.
A better explanation:
First rising edge - triggers and then every 8 rising edges thereafter it gets triggered again,
What i want:
First rising edge - doesn't trigger the timer. Every 8 clock cycle rising edges from the start triggers it without the first rising edge triggering it.
Is this possible.
Thank you in advance for any help.