cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate pulse with timer and comparator STM32F0

GPavl
Associate

Hi!

I have STM32F051K4Tx mcu. I would like to generate a short pulse of different width at each comparator event without using interrupt. Is this possible? How would I setup timer / comparator for this to work?

Thanks.

1 REPLY 1

The answer to this question depends on the answer to this question.

If red, it's easy-peasy, just set it up as with triggering pulse with any external trigger.

If blue, which I suspect is more likely, then, well, it has to be changed so it's like red, and I suspect the easiest way to do that is to output the comparator's output to a pin and externally connect to the timer's input pin. There might be an alternative way using TRGO-TRGI to a linked timer and then generate the pulse there.

JW