3
\$\begingroup\$

I have set up a slave timer that starts counting when the master timer is enabled.

I want to know if the slave starts counting when the master timer receives a valid edge (my configuration is count on the rising edge), or does the slave counter start counting as soon as the master is enabled and the slave receives a valid edge (clocked much faster than master)?

The picture below should help illustrate, I want to know if A) or B) is true. The slave also counts on rising edges.

Master-slave timing diagram

Technical details: I am using an STM32F072RB, the master timer is clocked externally from a comparator, the master is set up to trigger on Enable, and the slave timer is configured in Trigger mode.

AN4013 snippets:

Master configuration

Slave configuration

If scenario B) is true (as I suspect), how can I achieve scenario A)?

\$\endgroup\$
  • \$\begingroup\$ I have moved on as I suspect that B) holds true rather than A). I do not know how to do this internally, so I restructured the low speed counter to operate in Output Compare mode, and the High Speed counter to operate in Input Capture mode, with a physical wire connecting the two pins. I then use firmware to calculate the amount of counts on the high speed counter with the snapshots taken on every low speed counter edge. \$\endgroup\$ – AJBotha Mar 1 '17 at 6:53
  • \$\begingroup\$ Have you tried setting the Master Configuration to 'Update'. This should start the slave timer at a rising edge from the master timer. \$\endgroup\$ – BertVano Aug 14 '18 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.