Skip to main content
con3
Senior
Jan 22, 2018 9:28 AM UTC
Question

timer prescaler triggers on first rising edge

Posted on January 22, 2018 at 10:28

Hey everyone,

I'm using a stm32f722ze

I've got a small issue considering the prescaler on the timers. I'm using this to trigger an input capture and DMA request after 8 clock cycles, although the prescaler seems to have a slightly odd issue.

The issue:

first rising edge -> triggers input capture timer which triggers DMA

every eight rising edges after -> triggers input capture timer which triggers DMA

If I've set the prescaler to 8, I ideally would never want it to trigger on the first edge, but definetly on every 8th edge.

This completely screws up my timing as it need to only be triggered on every eight edges.

Ideally what I'd like is that first edge to never trigger the input capture, but rather every eight edges from the beginning. Is there any way that I can change this so that the first trigger doesn't happen?

Thanks in advance for any help. Its really appreciated.

#input-capture-mode #prescaler #stm32f7

Note: this post was migrated and contained many threaded conversations, some content may be missing.
This topic has been closed for replies.

8 replies

con3
con3Author
Senior
Jan 22, 2018 3:29 PM UTC
Posted on January 22, 2018 at 16:29

Also is there a way that I can manipulate the amount of rising edges the prescaler has seen? At some point Id like to reset it to 0 if its seen 4 rising edges. Which register stores the amount of edges ?

waclawek.jan
Super User
Jan 22, 2018 4:31 PM UTC
Posted on January 22, 2018 at 16:31

This register is not exposed so there's no direct way to manipulate it.

JW

con3
con3Author
Senior
Jan 22, 2018 4:33 PM UTC
Posted on January 22, 2018 at 16:33

So there's no way that i can reset it to 0? No timer function,etc that would allow this?

:(