.. | .. |
---|
3 | 3 | Contact: benjamin.gaignard@st.com |
---|
4 | 4 | Description: |
---|
5 | 5 | Reading returns the list possible master modes which are: |
---|
6 | | - - "reset" : The UG bit from the TIMx_EGR register is |
---|
| 6 | + |
---|
| 7 | + |
---|
| 8 | + - "reset" |
---|
| 9 | + The UG bit from the TIMx_EGR register is |
---|
7 | 10 | used as trigger output (TRGO). |
---|
8 | | - - "enable" : The Counter Enable signal CNT_EN is used |
---|
| 11 | + - "enable" |
---|
| 12 | + The Counter Enable signal CNT_EN is used |
---|
9 | 13 | as trigger output. |
---|
10 | | - - "update" : The update event is selected as trigger output. |
---|
| 14 | + - "update" |
---|
| 15 | + The update event is selected as trigger output. |
---|
11 | 16 | For instance a master timer can then be used |
---|
12 | 17 | as a prescaler for a slave timer. |
---|
13 | | - - "compare_pulse" : The trigger output send a positive pulse |
---|
14 | | - when the CC1IF flag is to be set. |
---|
15 | | - - "OC1REF" : OC1REF signal is used as trigger output. |
---|
16 | | - - "OC2REF" : OC2REF signal is used as trigger output. |
---|
17 | | - - "OC3REF" : OC3REF signal is used as trigger output. |
---|
18 | | - - "OC4REF" : OC4REF signal is used as trigger output. |
---|
| 18 | + - "compare_pulse" |
---|
| 19 | + The trigger output send a positive pulse |
---|
| 20 | + when the CC1IF flag is to be set. |
---|
| 21 | + - "OC1REF" |
---|
| 22 | + OC1REF signal is used as trigger output. |
---|
| 23 | + - "OC2REF" |
---|
| 24 | + OC2REF signal is used as trigger output. |
---|
| 25 | + - "OC3REF" |
---|
| 26 | + OC3REF signal is used as trigger output. |
---|
| 27 | + - "OC4REF" |
---|
| 28 | + OC4REF signal is used as trigger output. |
---|
| 29 | + |
---|
19 | 30 | Additional modes (on TRGO2 only): |
---|
20 | | - - "OC5REF" : OC5REF signal is used as trigger output. |
---|
21 | | - - "OC6REF" : OC6REF signal is used as trigger output. |
---|
| 31 | + |
---|
| 32 | + - "OC5REF" |
---|
| 33 | + OC5REF signal is used as trigger output. |
---|
| 34 | + - "OC6REF" |
---|
| 35 | + OC6REF signal is used as trigger output. |
---|
22 | 36 | - "compare_pulse_OC4REF": |
---|
23 | | - OC4REF rising or falling edges generate pulses. |
---|
| 37 | + OC4REF rising or falling edges generate pulses. |
---|
24 | 38 | - "compare_pulse_OC6REF": |
---|
25 | | - OC6REF rising or falling edges generate pulses. |
---|
| 39 | + OC6REF rising or falling edges generate pulses. |
---|
26 | 40 | - "compare_pulse_OC4REF_r_or_OC6REF_r": |
---|
27 | | - OC4REF or OC6REF rising edges generate pulses. |
---|
| 41 | + OC4REF or OC6REF rising edges generate pulses. |
---|
28 | 42 | - "compare_pulse_OC4REF_r_or_OC6REF_f": |
---|
29 | | - OC4REF rising or OC6REF falling edges generate pulses. |
---|
| 43 | + OC4REF rising or OC6REF falling edges generate |
---|
| 44 | + pulses. |
---|
30 | 45 | - "compare_pulse_OC5REF_r_or_OC6REF_r": |
---|
31 | | - OC5REF or OC6REF rising edges generate pulses. |
---|
| 46 | + OC5REF or OC6REF rising edges generate pulses. |
---|
32 | 47 | - "compare_pulse_OC5REF_r_or_OC6REF_f": |
---|
33 | | - OC5REF rising or OC6REF falling edges generate pulses. |
---|
| 48 | + OC5REF rising or OC6REF falling edges generate |
---|
| 49 | + pulses. |
---|
34 | 50 | |
---|
35 | | - +-----------+ +-------------+ +---------+ |
---|
36 | | - | Prescaler +-> | Counter | +-> | Master | TRGO(2) |
---|
37 | | - +-----------+ +--+--------+-+ |-> | Control +--> |
---|
38 | | - | | || +---------+ |
---|
39 | | - +--v--------+-+ OCxREF || +---------+ |
---|
40 | | - | Chx compare +----------> | Output | ChX |
---|
41 | | - +-----------+-+ | | Control +--> |
---|
42 | | - . | | +---------+ |
---|
43 | | - . | | . |
---|
44 | | - +-----------v-+ OC6REF | . |
---|
45 | | - | Ch6 compare +---------+> |
---|
46 | | - +-------------+ |
---|
| 51 | + :: |
---|
47 | 52 | |
---|
48 | | - Example with: "compare_pulse_OC4REF_r_or_OC6REF_r": |
---|
| 53 | + +-----------+ +-------------+ +---------+ |
---|
| 54 | + | Prescaler +-> | Counter | +-> | Master | TRGO(2) |
---|
| 55 | + +-----------+ +--+--------+-+ |-> | Control +--> |
---|
| 56 | + | | || +---------+ |
---|
| 57 | + +--v--------+-+ OCxREF || +---------+ |
---|
| 58 | + | Chx compare +----------> | Output | ChX |
---|
| 59 | + +-----------+-+ | | Control +--> |
---|
| 60 | + . | | +---------+ |
---|
| 61 | + . | | . |
---|
| 62 | + +-----------v-+ OC6REF | . |
---|
| 63 | + | Ch6 compare +---------+> |
---|
| 64 | + +-------------+ |
---|
49 | 65 | |
---|
50 | | - X |
---|
51 | | - X X |
---|
52 | | - X . . X |
---|
53 | | - X . . X |
---|
54 | | - X . . X |
---|
55 | | - count X . . . . X |
---|
56 | | - . . . . |
---|
57 | | - . . . . |
---|
58 | | - +---------------+ |
---|
59 | | - OC4REF | . . | |
---|
60 | | - +-+ . . +-+ |
---|
61 | | - . +---+ . |
---|
62 | | - OC6REF . | | . |
---|
63 | | - +-------+ +-------+ |
---|
64 | | - +-+ +-+ |
---|
65 | | - TRGO2 | | | | |
---|
66 | | - +-+ +---+ +---------+ |
---|
| 66 | + Example with: "compare_pulse_OC4REF_r_or_OC6REF_r":: |
---|
| 67 | + |
---|
| 68 | + X |
---|
| 69 | + X X |
---|
| 70 | + X . . X |
---|
| 71 | + X . . X |
---|
| 72 | + X . . X |
---|
| 73 | + count X . . . . X |
---|
| 74 | + . . . . |
---|
| 75 | + . . . . |
---|
| 76 | + +---------------+ |
---|
| 77 | + OC4REF | . . | |
---|
| 78 | + +-+ . . +-+ |
---|
| 79 | + . +---+ . |
---|
| 80 | + OC6REF . | | . |
---|
| 81 | + +-------+ +-------+ |
---|
| 82 | + +-+ +-+ |
---|
| 83 | + TRGO2 | | | | |
---|
| 84 | + +-+ +---+ +---------+ |
---|
67 | 85 | |
---|
68 | 86 | What: /sys/bus/iio/devices/triggerX/master_mode |
---|
69 | 87 | KernelVersion: 4.11 |
---|
.. | .. |
---|
91 | 109 | When counting down the counter start from preset value |
---|
92 | 110 | and fire event when reach 0. |
---|
93 | 111 | |
---|
94 | | -What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available |
---|
95 | | -KernelVersion: 4.12 |
---|
96 | | -Contact: benjamin.gaignard@st.com |
---|
97 | | -Description: |
---|
98 | | - Reading returns the list possible quadrature modes. |
---|
99 | | - |
---|
100 | | -What: /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode |
---|
101 | | -KernelVersion: 4.12 |
---|
102 | | -Contact: benjamin.gaignard@st.com |
---|
103 | | -Description: |
---|
104 | | - Configure the device counter quadrature modes: |
---|
105 | | - channel_A: |
---|
106 | | - Encoder A input servers as the count input and B as |
---|
107 | | - the UP/DOWN direction control input. |
---|
108 | | - |
---|
109 | | - channel_B: |
---|
110 | | - Encoder B input serves as the count input and A as |
---|
111 | | - the UP/DOWN direction control input. |
---|
112 | | - |
---|
113 | | - quadrature: |
---|
114 | | - Encoder A and B inputs are mixed to get direction |
---|
115 | | - and count with a scale of 0.25. |
---|
116 | | - |
---|
117 | 112 | What: /sys/bus/iio/devices/iio:deviceX/in_count_enable_mode_available |
---|
118 | 113 | KernelVersion: 4.12 |
---|
119 | 114 | Contact: benjamin.gaignard@st.com |
---|
.. | .. |
---|
127 | 122 | Configure the device counter enable modes, in all case |
---|
128 | 123 | counting direction is set by in_count0_count_direction |
---|
129 | 124 | attribute and the counter is clocked by the internal clock. |
---|
| 125 | + |
---|
130 | 126 | always: |
---|
131 | 127 | Counter is always ON. |
---|
132 | 128 | |
---|