This is an old revision of the document!
Timer Input
Programming Example
The code snippet bellow shows how to configure and use a GPIO pin as input.
#include "reg_stm32f4xx.h" /* TO-DODELI DOO. */
Configuration Registers
CR1
SMCR
Slave mode control register
ETP | 0 | ETR is noninverted, active at high level or rising edge. |
1 | ETR is inverted, active at low level or falling edge. | |
ETPS | 00 | Prescaler off. |
01 | fETPR / 2 | |
10 | fETPR / 4 | |
11 | fETPR / 8 | |
ETF | 0 | |
1 |