Timer Clock Source
Configuration Registers
TIMx_CR1 - Configuration register 1
TIMx_SMCR - Slave mode control register
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. */