^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/bus/iio/devices/triggerX/master_mode_available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) KernelVersion: 4.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Reading returns the list possible master modes which are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - "reset"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) The UG bit from the TIMx_EGR register is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) used as trigger output (TRGO).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - "enable"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) The Counter Enable signal CNT_EN is used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) - "update"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The update event is selected as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) For instance a master timer can then be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) as a prescaler for a slave timer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - "compare_pulse"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) The trigger output send a positive pulse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) when the CC1IF flag is to be set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) - "OC1REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) OC1REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) - "OC2REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) OC2REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - "OC3REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) OC3REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) - "OC4REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) OC4REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) Additional modes (on TRGO2 only):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - "OC5REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) OC5REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) - "OC6REF"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) OC6REF signal is used as trigger output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - "compare_pulse_OC4REF":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) OC4REF rising or falling edges generate pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - "compare_pulse_OC6REF":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) OC6REF rising or falling edges generate pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - "compare_pulse_OC4REF_r_or_OC6REF_r":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) OC4REF or OC6REF rising edges generate pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - "compare_pulse_OC4REF_r_or_OC6REF_f":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) OC4REF rising or OC6REF falling edges generate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - "compare_pulse_OC5REF_r_or_OC6REF_r":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) OC5REF or OC6REF rising edges generate pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - "compare_pulse_OC5REF_r_or_OC6REF_f":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) OC5REF rising or OC6REF falling edges generate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) pulses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) +-----------+ +-------------+ +---------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) | Prescaler +-> | Counter | +-> | Master | TRGO(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) +-----------+ +--+--------+-+ |-> | Control +-->
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) | | || +---------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) +--v--------+-+ OCxREF || +---------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) | Chx compare +----------> | Output | ChX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) +-----------+-+ | | Control +-->
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) . | | +---------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) . | | .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) +-----------v-+ OC6REF | .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) | Ch6 compare +---------+>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) +-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Example with: "compare_pulse_OC4REF_r_or_OC6REF_r"::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) X X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) X . . X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) X . . X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) X . . X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) count X . . . . X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) . . . .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) . . . .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) +---------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) OC4REF | . . |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) +-+ . . +-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) . +---+ .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) OC6REF . | | .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) +-------+ +-------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) +-+ +-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) TRGO2 | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) +-+ +---+ +---------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) What: /sys/bus/iio/devices/triggerX/master_mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) KernelVersion: 4.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) Reading returns the current master modes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) Writing set the master mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) What: /sys/bus/iio/devices/triggerX/sampling_frequency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) KernelVersion: 4.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) Reading returns the current sampling frequency.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) Writing an value different of 0 set and start sampling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) Writing 0 stop sampling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) What: /sys/bus/iio/devices/iio:deviceX/in_count0_preset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) KernelVersion: 4.12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) Reading returns the current preset value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) Writing sets the preset value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) When counting up the counter starts from 0 and fires an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) event when reach preset value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) When counting down the counter start from preset value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) and fire event when reach 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) What: /sys/bus/iio/devices/iio:deviceX/in_count_enable_mode_available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) KernelVersion: 4.12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) Reading returns the list possible enable modes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) What: /sys/bus/iio/devices/iio:deviceX/in_count0_enable_mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) KernelVersion: 4.12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) Configure the device counter enable modes, in all case
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) counting direction is set by in_count0_count_direction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) attribute and the counter is clocked by the internal clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) always:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) Counter is always ON.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) gated:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) Counting is enabled when connected trigger signal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) level is high else counting is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) triggered:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) Counting is enabled on rising edge of the connected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) trigger, and remains enabled for the duration of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) selected mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) What: /sys/bus/iio/devices/iio:deviceX/in_count_trigger_mode_available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) KernelVersion: 4.13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) Reading returns the list possible trigger modes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) What: /sys/bus/iio/devices/iio:deviceX/in_count0_trigger_mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) KernelVersion: 4.13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) Contact: benjamin.gaignard@st.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) Configure the device counter trigger mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) counting direction is set by in_count0_count_direction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) attribute and the counter is clocked by the connected trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) rising edges.