You understand the code correctly. I'm implementing a digital tachometer that controls an analog needle attached to a servo. The suggestion you made is a very good idea. I had not considered that before. I will try it now :) However, I'm still a bit worried by the fact that I can consistenly make the next timer's output a rubbish value by calling TIMx_SetCounter(0) at a certain frequency. I'm beginning to fear it might be some sort of bug. When I have some time I might verify this with a pulse generator as I can't believe it.