| 1 |
What: /sys/bus/counter/devices/counterX/cascade_counts_enable |
| 2 |
KernelVersion: 6.4 |
| 3 |
Contact: [email protected] |
| 4 |
Description: |
| 5 |
Indicates the cascading of Counts on Counter X. |
| 6 |
|
| 7 |
Valid attribute values are boolean. |
| 8 |
|
| 9 |
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select |
| 10 |
KernelVersion: 6.4 |
| 11 |
Contact: [email protected] |
| 12 |
Description: |
| 13 |
Selects the external clock pin for phase counting mode of |
| 14 |
Counter X. |
| 15 |
|
| 16 |
MTCLKA-MTCLKB: |
| 17 |
MTCLKA and MTCLKB pins are selected for the external |
| 18 |
phase clock. |
| 19 |
|
| 20 |
MTCLKC-MTCLKD: |
| 21 |
MTCLKC and MTCLKD pins are selected for the external |
| 22 |
phase clock. |
| 23 |
|
| 24 |
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_available |
| 25 |
KernelVersion: 6.4 |
| 26 |
Contact: [email protected] |
| 27 |
Description: |
| 28 |
Discrete set of available values for the respective device |
| 29 |
configuration are listed in this file. |
| 30 |
|
| 31 |
What: /sys/bus/counter/devices/counterX/countY/count |
| 32 |
KernelVersion: 5.2 |
| 33 |
Contact: [email protected] |
| 34 |
Description: |
| 35 |
Count data of Count Y represented as a string. |
| 36 |
|
| 37 |
What: /sys/bus/counter/devices/counterX/countY/compare |
| 38 |
KernelVersion: 6.15 |
| 39 |
Contact: [email protected] |
| 40 |
Description: |
| 41 |
If the counter device supports compare registers -- registers |
| 42 |
used to compare counter channels against a particular count -- |
| 43 |
the compare count for channel Y is provided by this attribute. |
| 44 |
|
| 45 |
What: /sys/bus/counter/devices/counterX/countY/capture |
| 46 |
KernelVersion: 6.1 |
| 47 |
Contact: [email protected] |
| 48 |
Description: |
| 49 |
Historical capture of the Count Y count data. |
| 50 |
|
| 51 |
What: /sys/bus/counter/devices/counterX/countY/ceiling |
| 52 |
KernelVersion: 5.2 |
| 53 |
Contact: [email protected] |
| 54 |
Description: |
| 55 |
Count value ceiling for Count Y. This is the upper limit for the |
| 56 |
respective counter. |
| 57 |
|
| 58 |
What: /sys/bus/counter/devices/counterX/countY/floor |
| 59 |
KernelVersion: 5.2 |
| 60 |
Contact: [email protected] |
| 61 |
Description: |
| 62 |
Count value floor for Count Y. This is the lower limit for the |
| 63 |
respective counter. |
| 64 |
|
| 65 |
What: /sys/bus/counter/devices/counterX/countY/count_mode |
| 66 |
KernelVersion: 5.2 |
| 67 |
Contact: [email protected] |
| 68 |
Description: |
| 69 |
Count mode for channel Y. The ceiling and floor values for |
| 70 |
Count Y are used by the count mode where required. The following |
| 71 |
count modes are available: |
| 72 |
|
| 73 |
normal: |
| 74 |
Counting is continuous in either direction. |
| 75 |
|
| 76 |
range limit: |
| 77 |
An upper or lower limit is set, mimicking limit switches |
| 78 |
in the mechanical counterpart. The upper limit is set to |
| 79 |
the Count Y ceiling value, while the lower limit is set |
| 80 |
to the Count Y floor value. The counter freezes at |
| 81 |
count = ceiling when counting up, and at count = floor |
| 82 |
when counting down. At either of these limits, the |
| 83 |
counting is resumed only when the count direction is |
| 84 |
reversed. |
| 85 |
|
| 86 |
non-recycle: |
| 87 |
The counter is disabled whenever a counter overflow or |
| 88 |
underflow takes place. The counter is re-enabled when a |
| 89 |
new count value is loaded to the counter via a preset |
| 90 |
operation or direct write. |
| 91 |
|
| 92 |
modulo-n: |
| 93 |
A count value boundary is set between the Count Y floor |
| 94 |
value and the Count Y ceiling value. The counter is |
| 95 |
reset to the Count Y floor value at count = ceiling when |
| 96 |
counting up, while the counter is set to the Count Y |
| 97 |
ceiling value at count = floor when counting down; the |
| 98 |
counter does not freeze at the boundary points, but |
| 99 |
counts continuously throughout. |
| 100 |
|
| 101 |
interrupt on terminal count: |
| 102 |
The output signal is initially low, and will remain low |
| 103 |
until the counter reaches zero. The output signal then |
| 104 |
goes high and remains high until a new preset value is |
| 105 |
set. |
| 106 |
|
| 107 |
hardware retriggerable one-shot: |
| 108 |
The output signal is initially high. The output signal |
| 109 |
will go low by a trigger input signal, and will remain |
| 110 |
low until the counter reaches zero. The output will then |
| 111 |
go high and remain high until the next trigger. A |
| 112 |
trigger results in loading the counter to the preset |
| 113 |
value and setting the output signal low, thus starting |
| 114 |
the one-shot pulse. |
| 115 |
|
| 116 |
rate generator: |
| 117 |
The output signal is initially high. When the counter |
| 118 |
has decremented to 1, the output signal goes low for one |
| 119 |
clock pulse. The output signal then goes high again, the |
| 120 |
counter is reloaded to the preset value, and the process |
| 121 |
repeats in a periodic manner as such. |
| 122 |
|
| 123 |
square wave mode: |
| 124 |
The output signal is initially high. |
| 125 |
|
| 126 |
If the initial count is even, the counter is decremented |
| 127 |
by two on succeeding clock pulses. When the count |
| 128 |
expires, the output signal changes value and the |
| 129 |
counter is reloaded to the preset value. The process |
| 130 |
repeats in periodic manner as such. |
| 131 |
|
| 132 |
If the initial count is odd, the initial count minus one |
| 133 |
(an even number) is loaded and then is decremented by |
| 134 |
two on succeeding clock pulses. One clock pulse after |
| 135 |
the count expires, the output signal goes low and the |
| 136 |
counter is reloaded to the preset value minus one. |
| 137 |
Succeeding clock pulses decrement the count by two. When |
| 138 |
the count expires, the output goes high again and the |
| 139 |
counter is reloaded to the preset value minus one. The |
| 140 |
process repeats in a periodic manner as such. |
| 141 |
|
| 142 |
software triggered strobe: |
| 143 |
The output signal is initially high. When the count |
| 144 |
expires, the output will go low for one clock pulse and |
| 145 |
then go high again. The counting sequence is "triggered" |
| 146 |
by setting the preset value. |
| 147 |
|
| 148 |
hardware triggered strobe: |
| 149 |
The output signal is initially high. Counting is started |
| 150 |
by a trigger input signal. When the count expires, the |
| 151 |
output signal will go low for one clock pulse and then |
| 152 |
go high again. A trigger results in loading the counter |
| 153 |
to the preset value. |
| 154 |
|
| 155 |
What: /sys/bus/counter/devices/counterX/countY/count_mode_available |
| 156 |
What: /sys/bus/counter/devices/counterX/countY/error_noise_available |
| 157 |
What: /sys/bus/counter/devices/counterX/countY/function_available |
| 158 |
What: /sys/bus/counter/devices/counterX/countY/prescaler_available |
| 159 |
What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available |
| 160 |
KernelVersion: 5.2 |
| 161 |
Contact: [email protected] |
| 162 |
Description: |
| 163 |
Discrete set of available values for the respective Count Y |
| 164 |
configuration are listed in this file. Values are delimited by |
| 165 |
newline characters. |
| 166 |
|
| 167 |
What: /sys/bus/counter/devices/counterX/countY/direction |
| 168 |
KernelVersion: 5.2 |
| 169 |
Contact: [email protected] |
| 170 |
Description: |
| 171 |
Read-only attribute that indicates the count direction of Count |
| 172 |
Y. Two count directions are available: forward and backward. |
| 173 |
|
| 174 |
Some counter devices are able to determine the direction of |
| 175 |
their counting. For example, quadrature encoding counters can |
| 176 |
determine the direction of movement by evaluating the leading |
| 177 |
phase of the respective A and B quadrature encoding signals. |
| 178 |
This attribute exposes such count directions. |
| 179 |
|
| 180 |
What: /sys/bus/counter/devices/counterX/countY/enable |
| 181 |
KernelVersion: 5.2 |
| 182 |
Contact: [email protected] |
| 183 |
Description: |
| 184 |
Whether channel Y counter is enabled. Valid attribute values are |
| 185 |
boolean. |
| 186 |
|
| 187 |
This attribute is intended to serve as a pause/unpause mechanism |
| 188 |
for Count Y. Suppose a counter device is used to count the total |
| 189 |
movement of a conveyor belt: this attribute allows an operator |
| 190 |
to temporarily pause the counter, service the conveyor belt, |
| 191 |
and then finally unpause the counter to continue where it had |
| 192 |
left off. |
| 193 |
|
| 194 |
What: /sys/bus/counter/devices/counterX/countY/error_noise |
| 195 |
KernelVersion: 5.2 |
| 196 |
Contact: [email protected] |
| 197 |
Description: |
| 198 |
Read-only attribute that indicates whether excessive noise is |
| 199 |
present at the channel Y counter inputs. |
| 200 |
|
| 201 |
What: /sys/bus/counter/devices/counterX/countY/function |
| 202 |
KernelVersion: 5.2 |
| 203 |
Contact: [email protected] |
| 204 |
Description: |
| 205 |
Count function mode of Count Y; count function evaluation is |
| 206 |
triggered by conditions specified by the Count Y signalZ_action |
| 207 |
attributes. The following count functions are available: |
| 208 |
|
| 209 |
increase: |
| 210 |
Accumulated count is incremented. |
| 211 |
|
| 212 |
decrease: |
| 213 |
Accumulated count is decremented. |
| 214 |
|
| 215 |
pulse-direction: |
| 216 |
Rising edges on signal A updates the respective count. |
| 217 |
The input level of signal B determines direction. |
| 218 |
|
| 219 |
quadrature x1 a: |
| 220 |
If direction is forward, rising edges on quadrature pair |
| 221 |
signal A updates the respective count; if the direction |
| 222 |
is backward, falling edges on quadrature pair signal A |
| 223 |
updates the respective count. Quadrature encoding |
| 224 |
determines the direction. |
| 225 |
|
| 226 |
quadrature x1 b: |
| 227 |
If direction is forward, rising edges on quadrature pair |
| 228 |
signal B updates the respective count; if the direction |
| 229 |
is backward, falling edges on quadrature pair signal B |
| 230 |
updates the respective count. Quadrature encoding |
| 231 |
determines the direction. |
| 232 |
|
| 233 |
quadrature x2 a: |
| 234 |
Any state transition on quadrature pair signal A updates |
| 235 |
the respective count. Quadrature encoding determines the |
| 236 |
direction. |
| 237 |
|
| 238 |
quadrature x2 b: |
| 239 |
Any state transition on quadrature pair signal B updates |
| 240 |
the respective count. Quadrature encoding determines the |
| 241 |
direction. |
| 242 |
|
| 243 |
quadrature x4: |
| 244 |
Any state transition on either quadrature pair signals |
| 245 |
updates the respective count. Quadrature encoding |
| 246 |
determines the direction. |
| 247 |
|
| 248 |
What: /sys/bus/counter/devices/counterX/countY/name |
| 249 |
KernelVersion: 5.2 |
| 250 |
Contact: [email protected] |
| 251 |
Description: |
| 252 |
Read-only attribute that indicates the device-specific name of |
| 253 |
Count Y. If possible, this should match the name of the |
| 254 |
respective channel as it appears in the device datasheet. |
| 255 |
|
| 256 |
What: /sys/bus/counter/devices/counterX/countY/prescaler |
| 257 |
KernelVersion: 5.2 |
| 258 |
Contact: [email protected] |
| 259 |
Description: |
| 260 |
Configure the prescaler value associated with Count Y. |
| 261 |
On the FlexTimer, the counter clock source passes through a |
| 262 |
prescaler (i.e. a counter). This acts like a clock |
| 263 |
divider. |
| 264 |
|
| 265 |
What: /sys/bus/counter/devices/counterX/countY/preset |
| 266 |
KernelVersion: 5.2 |
| 267 |
Contact: [email protected] |
| 268 |
Description: |
| 269 |
If the counter device supports preset registers -- registers |
| 270 |
used to load counter channels to a set count upon device-defined |
| 271 |
preset operation trigger events -- the preset count for channel |
| 272 |
Y is provided by this attribute. |
| 273 |
|
| 274 |
What: /sys/bus/counter/devices/counterX/countY/preset_enable |
| 275 |
KernelVersion: 5.2 |
| 276 |
Contact: [email protected] |
| 277 |
Description: |
| 278 |
Whether channel Y counter preset operation is enabled. Valid |
| 279 |
attribute values are boolean. |
| 280 |
|
| 281 |
What: /sys/bus/counter/devices/counterX/countY/signalZ_action |
| 282 |
KernelVersion: 5.2 |
| 283 |
Contact: [email protected] |
| 284 |
Description: |
| 285 |
Action mode of Count Y for Signal Z. This attribute indicates |
| 286 |
the condition of Signal Z that triggers the count function |
| 287 |
evaluation for Count Y. The following action modes are |
| 288 |
available: |
| 289 |
|
| 290 |
none: |
| 291 |
Signal does not trigger the count function. In |
| 292 |
Pulse-Direction count function mode, this Signal is |
| 293 |
evaluated as Direction. |
| 294 |
|
| 295 |
rising edge: |
| 296 |
Low state transitions to high state. |
| 297 |
|
| 298 |
falling edge: |
| 299 |
High state transitions to low state. |
| 300 |
|
| 301 |
both edges: |
| 302 |
Any state transition. |
| 303 |
|
| 304 |
What: /sys/bus/counter/devices/counterX/countY/num_overflows |
| 305 |
KernelVersion: 6.1 |
| 306 |
Contact: [email protected] |
| 307 |
Description: |
| 308 |
This attribute indicates the number of overflows of count Y. |
| 309 |
|
| 310 |
What: /sys/bus/counter/devices/counterX/cascade_counts_enable_component_id |
| 311 |
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id |
| 312 |
What: /sys/bus/counter/devices/counterX/countY/capture_component_id |
| 313 |
What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id |
| 314 |
What: /sys/bus/counter/devices/counterX/countY/compare_component_id |
| 315 |
What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id |
| 316 |
What: /sys/bus/counter/devices/counterX/countY/direction_component_id |
| 317 |
What: /sys/bus/counter/devices/counterX/countY/enable_component_id |
| 318 |
What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id |
| 319 |
What: /sys/bus/counter/devices/counterX/countY/floor_component_id |
| 320 |
What: /sys/bus/counter/devices/counterX/countY/num_overflows_component_id |
| 321 |
What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id |
| 322 |
What: /sys/bus/counter/devices/counterX/countY/preset_component_id |
| 323 |
What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id |
| 324 |
What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id |
| 325 |
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id |
| 326 |
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id |
| 327 |
What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id |
| 328 |
What: /sys/bus/counter/devices/counterX/signalY/frequency_component_id |
| 329 |
What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id |
| 330 |
What: /sys/bus/counter/devices/counterX/signalY/polarity_component_id |
| 331 |
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id |
| 332 |
KernelVersion: 5.16 |
| 333 |
Contact: [email protected] |
| 334 |
Description: |
| 335 |
Read-only attribute that indicates the component ID of the |
| 336 |
respective extension or Synapse. |
| 337 |
|
| 338 |
What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns |
| 339 |
KernelVersion: 5.14 |
| 340 |
Contact: [email protected] |
| 341 |
Description: |
| 342 |
If the counter device supports programmable spike filter this |
| 343 |
attribute indicates the value in nanoseconds where noise pulses |
| 344 |
shorter or equal to configured value are ignored. Value 0 means |
| 345 |
filter is disabled. |
| 346 |
|
| 347 |
What: /sys/bus/counter/devices/counterX/events_queue_size |
| 348 |
KernelVersion: 5.16 |
| 349 |
Contact: [email protected] |
| 350 |
Description: |
| 351 |
Size of the Counter events queue in number of struct |
| 352 |
counter_event data structures. The number of elements will be |
| 353 |
rounded-up to a power of 2. |
| 354 |
|
| 355 |
What: /sys/bus/counter/devices/counterX/name |
| 356 |
KernelVersion: 5.2 |
| 357 |
Contact: [email protected] |
| 358 |
Description: |
| 359 |
Read-only attribute that indicates the device-specific name of |
| 360 |
the Counter. This should match the name of the device as it |
| 361 |
appears in its respective datasheet. |
| 362 |
|
| 363 |
What: /sys/bus/counter/devices/counterX/num_counts |
| 364 |
KernelVersion: 5.2 |
| 365 |
Contact: [email protected] |
| 366 |
Description: |
| 367 |
Read-only attribute that indicates the total number of Counts |
| 368 |
belonging to the Counter. |
| 369 |
|
| 370 |
What: /sys/bus/counter/devices/counterX/num_signals |
| 371 |
KernelVersion: 5.2 |
| 372 |
Contact: [email protected] |
| 373 |
Description: |
| 374 |
Read-only attribute that indicates the total number of Signals |
| 375 |
belonging to the Counter. |
| 376 |
|
| 377 |
What: /sys/bus/counter/devices/counterX/signalY/cable_fault |
| 378 |
KernelVersion: 5.7 |
| 379 |
Contact: [email protected] |
| 380 |
Description: |
| 381 |
Read-only attribute that indicates whether a differential |
| 382 |
encoder cable fault (not connected or loose wires) is detected |
| 383 |
for the respective channel of Signal Y. Valid attribute values |
| 384 |
are boolean. Detection must first be enabled via the |
| 385 |
corresponding cable_fault_enable attribute. |
| 386 |
|
| 387 |
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable |
| 388 |
KernelVersion: 5.7 |
| 389 |
Contact: [email protected] |
| 390 |
Description: |
| 391 |
Whether detection of differential encoder cable faults for the |
| 392 |
respective channel of Signal Y is enabled. Valid attribute |
| 393 |
values are boolean. |
| 394 |
|
| 395 |
What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler |
| 396 |
KernelVersion: 5.7 |
| 397 |
Contact: [email protected] |
| 398 |
Description: |
| 399 |
Filter clock factor for input Signal Y. This prescaler value |
| 400 |
affects the inputs of both quadrature pair signals. |
| 401 |
|
| 402 |
What: /sys/bus/counter/devices/counterX/signalY/index_polarity |
| 403 |
KernelVersion: 5.2 |
| 404 |
Contact: [email protected] |
| 405 |
Description: |
| 406 |
Active level of index input Signal Y; irrelevant in |
| 407 |
non-synchronous load mode. |
| 408 |
|
| 409 |
What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available |
| 410 |
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available |
| 411 |
KernelVersion: 5.2 |
| 412 |
Contact: [email protected] |
| 413 |
Description: |
| 414 |
Discrete set of available values for the respective Signal Y |
| 415 |
configuration are listed in this file. |
| 416 |
|
| 417 |
What: /sys/bus/counter/devices/counterX/signalY/polarity |
| 418 |
KernelVersion: 6.1 |
| 419 |
Contact: [email protected] |
| 420 |
Description: |
| 421 |
Active level of Signal Y. The following polarity values are |
| 422 |
available: |
| 423 |
|
| 424 |
positive: |
| 425 |
Signal high state considered active level (rising edge). |
| 426 |
|
| 427 |
negative: |
| 428 |
Signal low state considered active level (falling edge). |
| 429 |
|
| 430 |
What: /sys/bus/counter/devices/counterX/signalY/name |
| 431 |
KernelVersion: 5.2 |
| 432 |
Contact: [email protected] |
| 433 |
Description: |
| 434 |
Read-only attribute that indicates the device-specific name of |
| 435 |
Signal Y. If possible, this should match the name of the |
| 436 |
respective signal as it appears in the device datasheet. |
| 437 |
|
| 438 |
What: /sys/bus/counter/devices/counterX/signalY/signal |
| 439 |
KernelVersion: 5.2 |
| 440 |
Contact: [email protected] |
| 441 |
Description: |
| 442 |
Signal level state of Signal Y. The following signal level |
| 443 |
states are available: |
| 444 |
|
| 445 |
low: |
| 446 |
Low level state. |
| 447 |
|
| 448 |
high: |
| 449 |
High level state. |
| 450 |
|
| 451 |
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode |
| 452 |
KernelVersion: 5.2 |
| 453 |
Contact: [email protected] |
| 454 |
Description: |
| 455 |
Configure the counter associated with Signal Y for |
| 456 |
non-synchronous or synchronous load mode. Synchronous load mode |
| 457 |
cannot be selected in non-quadrature (Pulse-Direction) clock |
| 458 |
mode. |
| 459 |
|
| 460 |
non-synchronous: |
| 461 |
A logic low level is the active level at this index |
| 462 |
input. The index function (as enabled via preset_enable) |
| 463 |
is performed directly on the active level of the index |
| 464 |
input. |
| 465 |
|
| 466 |
synchronous: |
| 467 |
Intended for interfacing with encoder Index output in |
| 468 |
quadrature clock mode. The active level is configured |
| 469 |
via index_polarity. The index function (as enabled via |
| 470 |
preset_enable) is performed synchronously with the |
| 471 |
quadrature clock on the active level of the index input. |
| 472 |
|
| 473 |
What: /sys/bus/counter/devices/counterX/signalY/frequency |
| 474 |
KernelVersion: 6.1 |
| 475 |
Contact: [email protected] |
| 476 |
Description: |
| 477 |
Read-only attribute that indicates the signal Y frequency, in Hz. |