cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f103 counter in timer mode

RP.11
Associate

Hello, I need advice. I am working on a device for revolution counting and need advice how to put the timer in the counter mode in operation with the stm32f103rb processor in order to count external pulse independently and I would like to have the revolutions displayed from time to time and reset the timer counter.

Thanks for every advice

1 REPLY 1
berendi
Principal

The Clock Selection and Encoder interface mode chapters under timer functional description in the RM0008 Reference manual provide extensive step-by-step instructions that you can use depending on how the sensor(s) is(are) connected. Don't forget to enable the timer and GPIO clocks beforehand, see the Reset and clock control chapter in the Reference manual.

The counter can be reset anytime by writing 0 to the CNT register.

Displays come in many flavors, so it's impossible to answer without specifics.