Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
stm32:peripherals:timer_input [2016/06/27 11:56] feurstm32:peripherals:timer_input [2016/06/28 11:53] (current) – removed feur
Line 1: Line 1:
-====== Timer Input ====== 
  
-\\ {{timer_clock.svg}} \\ \\ 
- 
-===== Programming Example ===== 
- 
-The code snippet bellow shows how to configure and use a GPIO pin as input. 
- 
-<code c> 
-#include "reg_stm32f4xx.h" 
- 
-/* TO-DODELI DOO. */ 
-</code> 
-\\ 
- 
-> {{logo_hal.svg?72px |}} **Hardware Abstraction Layer** 
-> [[https://ennis.zhaw.ch/hal/structreg__tim__t.html | Registry Types]] 
-> [[https://ennis.zhaw.ch/hal/hal__timer_8h.html | InES Timer HAL Interface]] 
-\\ 
- 
-===== Configuration Registers ===== 
- 
-==== CR1 ==== 
- 
-Configuration register 1 
- 
-\\ {{timer_reg_cr1.svg}} \\ \\ 
- 
-|< 100% 5em 5em >| 
-|DIR|0|Counter used as upcounter| 
-|:::|1|Counter used as downcounter| 
-|:::|//This bit is readonly in center-aligned or encoder mode//|| 
-|OPM|0|Counter is **not** stopped at update event| 
-|:::|1|Counter stops at the next update event| 
-|CEN|0|Counter disabled| 
-|:::|1|Counter enabled| 
- 
-==== SMCR ==== 
- 
-Slave mode control register 
- 
-\\ {{timer_reg_smcr.svg}} \\ \\ 
- 
-|< 100% 5em 5em >| 
-|ETR|0|ETR is **not** inverted, active at high level or rising edge| 
-|:::|1|ETR is inverted, active at low level or falling edge| 
-|ECE|0|External clock mode 2 disabled| 
-|:::|1|External clock mode 2 enabled. Clock enabled by any active edge on ETRF| 
- 
-===== Data Registers ===== 
- 
-==== CNT ==== 
- 
-Count register 
- 
-\\ {{timer_reg_cnt.svg}} \\ \\ 
- 
-===== Legend ===== 
- 
-\\ {{legende.svg}} \\ \\ 
  • stm32/peripherals/timer_input.1467028615.txt.gz
  • Last modified: 2016/06/27 11:56
  • by feur