• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter
2
3STM32 Low-Power Timer provides several counter modes. It can be used as:
4- quadrature encoder to detect angular position and direction of rotary
5  elements, from IN1 and IN2 input signals.
6- simple counter from IN1 input signal.
7
8Must be a sub-node of an STM32 Low-Power Timer device tree node.
9See ../mfd/stm32-lptimer.txt for details about the parent node.
10
11Required properties:
12- compatible:		Must be "st,stm32-lptimer-counter".
13- pinctrl-names: 	Set to "default". An additional "sleep" state can be
14			defined to set pins in sleep state.
15- pinctrl-n: 		List of phandles pointing to pin configuration nodes,
16			to set IN1/IN2 pins in mode of operation for Low-Power
17			Timer input on external pin.
18
19Example:
20	timer@40002400 {
21		compatible = "st,stm32-lptimer";
22		...
23		counter {
24			compatible = "st,stm32-lptimer-counter";
25			pinctrl-names = "default", "sleep";
26			pinctrl-0 = <&lptim1_in_pins>;
27			pinctrl-1 = <&lptim1_sleep_in_pins>;
28		};
29	};
30