4

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)?

Peter Mortensen
  • 1,676
  • 3
  • 17
  • 23
AJBotha
  • 416
  • 8
  • 17
  • 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. – AJBotha Mar 01 '17 at 06:53
  • Have you tried setting the Master Configuration to 'Update'. This should start the slave timer at a rising edge from the master timer. – BertVano Aug 14 '18 at 15:02

0 Answers0