====== Timer Clock Source ======
\\ {{timer_clock.svg}} \\ \\
===== Configuration Registers =====
==== TIMx_CR1 - Configuration register 1 ====
\\ {{timer_reg_cr1.svg}} \\ \\
|< 100% 5em 5em >|
|CKD|00|tDTS => tCKINT|
|:::|01|tDTS => 2 · tCKINT|
|:::|10|tDTS => 4 · tCKINT|
|:::|11|Reserved|
==== TIMx_SMCR - Slave mode control register ====
\\ {{timer_reg_smcr.svg}} \\ \\
|< 100% 5em 5em 20em 5em >|
|ETP|0|ETR is noninverted, active at high level or rising edge (reset state)||
|:::|1|ETR is inverted, active at low level or falling edge||
|ETPS|00|Prescaler off (reset state)||
|:::|01|fETRP / 2||
|:::|10|fETRP / 4||
|:::|11|fETRP / 8||
===== Programming Example =====
The code snippet below shows how to configure and use a GPIO pin as input.
#include "reg_stm32f4xx.h"
/* TO-DODELI DOO. */
\\