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




CKD00tDTS ⇒ tCKINT
01tDTS ⇒ 2 · tCKINT
10tDTS ⇒ 4 · tCKINT
11Reserved

Slave mode control register




ETP0ETR is noninverted, active at high level or rising edge.
1ETR is inverted, active at low level or falling edge.
ETPS00Prescaler off.
01fETRP / 2
10fETRP / 4
11fETRP / 8
EXTSEL0000No filter, fDTS (reset state)1000fsampling ⇒ fDTS / 8, N=6
0001fsampling ⇒ fCKINT, N=21001fsampling ⇒ fDTS / 8, N=8
0010fsampling ⇒ fCKINT, N=41010fsampling ⇒ fDTS / 16, N=5
0011fsampling ⇒ fCKINT, N=81011fsampling ⇒ fDTS / 16, N=6
0100fsampling ⇒ fDTS / 2, N=61100fsampling ⇒ fDTS / 16, N=8
0101fsampling ⇒ fDTS / 2, N=81101fsampling ⇒ fDTS / 32, N=5
0110fsampling ⇒ fDTS / 4, N=61110fsampling ⇒ fDTS / 32, N=6
0111fsampling ⇒ fDTS / 4, N=81111fsampling ⇒ fDTS / 32, N=8




  • stm32/peripherals/timer_input.1467030984.txt.gz
  • Last modified: 2016/06/27 12:36
  • by feur