This is an old revision of the document!


Timer Input




The code snippet bellow shows how to configure and use a GPIO pin as input.

#include "reg_stm32f4xx.h"
 
/* TO-DODELI DOO. */


Hardware Abstraction Layer
Registry Types
InES Timer HAL Interface


Configuration register 1




DIR0Counter used as upcounter
1Counter used as downcounter
This bit is readonly in center-aligned or encoder mode
OPM0Counter is not stopped at update event
1Counter stops at the next update event
CEN0Counter disabled
1Counter enabled

Slave mode control register




ETR0ETR is not inverted, active at high level or rising edge
1ETR is inverted, active at low level or falling edge
ECE0External clock mode 2 disabled
1External clock mode 2 enabled. Clock enabled by any active edge on ETRF

Count register







  • stm32/peripherals/timer_input.1467028615.txt.gz
  • Last modified: 2016/06/27 11:56
  • by feur