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 12:36] – [SMCR] 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 >| 
-|CKD|00|t<sub>DTS</sub> => t<sub>CKINT</sub>| 
-|:::|01|t<sub>DTS</sub> => 2 · t<sub>CKINT</sub>| 
-|:::|10|t<sub>DTS</sub> => 4 · t<sub>CKINT</sub>| 
-|:::|11|Reserved| 
- 
-==== SMCR ==== 
- 
-Slave mode control register 
- 
-\\ {{timer_reg_smcr.svg}} \\ \\ 
- 
-|< 100% 5em 5em 20em 5em >| 
-|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|f<sub>ETRP</sub> / 2| 
-|:::|10|f<sub>ETRP</sub> / 4| 
-|:::|11|f<sub>ETRP</sub> / 8| 
-|EXTSEL|0000|No filter, f<sub>DTS</sub> (reset state)|1000|f<sub>sampling</sub> => f<sub>DTS</sub> / 8, N=6| 
-|:::|0001|f<sub>sampling</sub> => f<sub>CKINT</sub>, N=2|1001|f<sub>sampling</sub> => f<sub>DTS</sub> / 8, N=8| 
-|:::|0010|f<sub>sampling</sub> => f<sub>CKINT</sub>, N=4|1010|f<sub>sampling</sub> => f<sub>DTS</sub> / 16, N=5| 
-|:::|0011|f<sub>sampling</sub> => f<sub>CKINT</sub>, N=8|1011|f<sub>sampling</sub> => f<sub>DTS</sub> / 16, N=6| 
-|:::|0100|f<sub>sampling</sub> => f<sub>DTS</sub> / 2, N=6|1100|f<sub>sampling</sub> => f<sub>DTS</sub> / 16, N=8| 
-|:::|0101|f<sub>sampling</sub> => f<sub>DTS</sub> / 2, N=8|1101|f<sub>sampling</sub> => f<sub>DTS</sub> / 32, N=5| 
-|:::|0110|f<sub>sampling</sub> => f<sub>DTS</sub> / 4, N=6|1110|f<sub>sampling</sub> => f<sub>DTS</sub> / 32, N=6| 
-|:::|0111|f<sub>sampling</sub> => f<sub>DTS</sub> / 4, N=8|1111|f<sub>sampling</sub> => f<sub>DTS</sub> / 32, N=8| 
- 
-===== Legend ===== 
- 
-\\ {{legende.svg}} \\ \\ 
  • stm32/peripherals/timer_input.1467030984.txt.gz
  • Last modified: 2016/06/27 12:36
  • by feur