← Documents Documentation/ABI/testing/sysfs-bus-counter GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Generic Counter sysfs ABI

Generic Counter subsystem의 device, Count, Signal, Synapse와 extension attributes를 설명하며 count modes, quadrature functions, presets, event queue와 signal conditioning controls를 정의합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-counter
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Counter device configuration

sysfs-bus-counter:1-29

Counter cascading을 enable하고 phase-counting mode의 external clock pin pair를 선택하며 지원되는 configuration values를 조회합니다.

Count data, compare, capture와 limits

sysfs-bus-counter:31-63

Count Y의 현재 count, compare·capture values와 ceiling·floor limits를 제공합니다.

Count mode semantics

sysfs-bus-counter:65-153

Continuous, range-limited, non-recycle, modulo-N, terminal-count interrupt, one-shot, rate-generator, square-wave와 software/hardware strobe modes의 boundary 및 output 동작을 정의합니다.

Available values와 Count state

sysfs-bus-counter:155-199

Count configuration의 available values와 direction, pause-style enable state, excessive input noise 상태를 제공합니다.

Count functions와 quadrature decoding

sysfs-bus-counter:201-246

Increase/decrease, pulse-direction과 quadrature x1·x2·x4 functions에서 어떤 signal transition이 count를 갱신하는지 정의합니다.

Count naming, prescaler, preset와 actions

sysfs-bus-counter:248-308

Count name, clock prescaler, preset operation, Signal Z action trigger와 overflow count를 설명합니다.

Extension과 Synapse component IDs

sysfs-bus-counter:310-336

Device, Count, Signal extensions와 Synapse별 read-only component ID attributes를 정의합니다.

Filters, event queue와 device metadata

sysfs-bus-counter:338-375

Spike filter threshold, power-of-two event queue size, device name과 Count·Signal totals를 제공합니다.

Signal fault, filter와 index configuration

sysfs-bus-counter:377-415

Differential encoder cable faults, input filter prescaler, index polarity와 available Signal configuration values를 설명합니다.

Signal polarity, level, synchronization과 frequency

sysfs-bus-counter:417-477

Signal active polarity와 level, device-specific name, synchronous index-load behavior와 frequency를 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/bus/counter/devices/counterX/cascade_counts_enable
2 KernelVersion: 6.4
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
476 Description:
477 Read-only attribute that indicates the signal Y frequency, in Hz.
478

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Counter device-level configuration

1-29
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/cascade_counts_enable6.4 / [email protected]Counter X에서 Counts의 cascading 여부를 나타냅니다. 유효한 attribute 값은 boolean입니다.
/sys/bus/counter/devices/counterX/external_input_phase_clock_select6.4 / [email protected]Counter X의 phase counting mode에 사용할 external clock pin을 선택합니다. MTCLKA-MTCLKB는 external phase clock으로 MTCLKA와 MTCLKB pins를 선택하며, MTCLKC-MTCLKD는 MTCLKC와 MTCLKD pins를 선택합니다.
/sys/bus/counter/devices/counterX/external_input_phase_clock_select_available6.4 / [email protected]해당 device configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다.

Count Y values와 limits

31-63
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/countY/count5.2 / [email protected]문자열로 표현한 Count Y의 count data입니다.
/sys/bus/counter/devices/counterX/countY/compare6.15 / [email protected]Counter device가 특정 count와 counter channels를 비교하는 compare registers를 지원하면 이 attribute가 channel Y의 compare count를 제공합니다.
/sys/bus/counter/devices/counterX/countY/capture6.1 / [email protected]Count Y count data의 historical capture입니다.
/sys/bus/counter/devices/counterX/countY/ceiling5.2 / [email protected]Count Y의 count value ceiling입니다. 해당 counter의 upper limit입니다.
/sys/bus/counter/devices/counterX/countY/floor5.2 / [email protected]Count Y의 count value floor입니다. 해당 counter의 lower limit입니다.

Count Y count modes

65-153
항목전문 번역
What/sys/bus/counter/devices/counterX/countY/count_mode
KernelVersion5.2
Contact[email protected]
DescriptionChannel Y의 count mode입니다. 필요한 count mode에서는 Count Y의 ceiling과 floor 값을 사용합니다. 사용할 수 있는 count modes는 다음과 같습니다.
Count mode전문 번역
normal어느 방향으로든 counting이 연속해서 이루어집니다.
range limit기계 장치의 limit switches를 흉내 내도록 upper 또는 lower limit을 설정합니다. Upper limit은 Count Y ceiling, lower limit은 Count Y floor입니다. 위로 셀 때 count = ceiling에서, 아래로 셀 때 count = floor에서 counter가 정지하며, limit에 도달한 뒤에는 count direction이 반전되어야 counting을 재개합니다.
non-recycleCounter overflow 또는 underflow가 발생하면 counter를 disable합니다. Preset operation이나 직접 쓰기로 새 count value를 load하면 counter를 다시 enable합니다.
modulo-nCount Y floor와 ceiling 사이에 count boundary를 둡니다. 위로 셀 때 count = ceiling에서 floor로 reset하고, 아래로 셀 때 count = floor에서 ceiling으로 설정합니다. Boundary points에서 멈추지 않고 계속 counting합니다.
interrupt on terminal countOutput signal은 처음에 low이고 counter가 0에 도달할 때까지 low를 유지합니다. 그 뒤 high가 되어 새 preset value를 설정할 때까지 high를 유지합니다.
hardware retriggerable one-shotOutput signal은 처음에 high입니다. Trigger input signal이 들어오면 low가 되고 counter가 0에 도달할 때까지 low를 유지한 뒤 다음 trigger까지 high를 유지합니다. Trigger는 counter에 preset value를 load하고 output을 low로 설정하여 one-shot pulse를 시작합니다.
rate generatorOutput signal은 처음에 high입니다. Counter가 1까지 감소하면 한 clock pulse 동안 low가 됩니다. 이어서 다시 high가 되고 counter는 preset value로 reload되며 이 과정이 주기적으로 반복됩니다.
square wave modeOutput signal은 처음에 high입니다. Initial count가 짝수이면 이어지는 clock pulses마다 2씩 감소하고 count가 만료되면 output이 반전되며 counter를 preset value로 reload하여 주기적으로 반복합니다. Initial count가 홀수이면 initial count minus one인 짝수를 load해 2씩 감소시킵니다. 만료 한 clock pulse 뒤 output이 low가 되고 preset value minus one을 reload해 2씩 감소시킵니다. 다시 만료되면 output이 high가 되고 preset value minus one을 reload하며 이 과정이 주기적으로 반복됩니다.
software triggered strobeOutput signal은 처음에 high입니다. Count가 만료되면 한 clock pulse 동안 low가 되었다가 다시 high가 됩니다. Preset value 설정이 counting sequence를 trigger합니다.
hardware triggered strobeOutput signal은 처음에 high입니다. Trigger input signal이 counting을 시작하며 count가 만료되면 한 clock pulse 동안 low가 되었다가 다시 high가 됩니다. Trigger는 counter에 preset value를 load합니다.

Count configuration과 runtime state

155-199
공통 available-value pathsKernel / Contact
/sys/bus/counter/devices/counterX/countY/count_mode_available5.2 / [email protected]
/sys/bus/counter/devices/counterX/countY/error_noise_available5.2 / [email protected]
/sys/bus/counter/devices/counterX/countY/function_available5.2 / [email protected]
/sys/bus/counter/devices/counterX/countY/prescaler_available5.2 / [email protected]
/sys/bus/counter/devices/counterX/countY/signalZ_action_available5.2 / [email protected]

위 files에는 해당 Count Y configuration에서 사용할 수 있는 discrete values 집합을 나열하며 values는 newline characters로 구분합니다.

WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/countY/direction5.2 / [email protected]Count Y의 count direction을 나타내는 read-only attribute입니다. 가능한 방향은 forward와 backward입니다. 일부 counter devices는 count direction을 알아낼 수 있습니다. 예를 들어 quadrature encoding counters는 A와 B quadrature encoding signals에서 어느 phase가 앞서는지 평가해 movement direction을 판단합니다. 이 attribute는 그러한 count directions를 노출합니다.
/sys/bus/counter/devices/counterX/countY/enable5.2 / [email protected]Channel Y counter의 enable 여부입니다. 유효한 값은 boolean이며 Count Y의 pause/unpause mechanism 용도입니다. Conveyor belt의 total movement를 세는 경우 operator가 일시 정지하고 belt를 정비한 뒤 중단 지점부터 다시 이어서 셀 수 있습니다.
/sys/bus/counter/devices/counterX/countY/error_noise5.2 / [email protected]Channel Y counter inputs에 excessive noise가 존재하는지를 나타내는 read-only attribute입니다.

Count functions와 quadrature evaluation

201-246
항목전문 번역
What/sys/bus/counter/devices/counterX/countY/function
KernelVersion5.2
Contact[email protected]
DescriptionCount Y의 count function mode입니다. Count function 평가는 Count Y의 signalZ_action attributes가 지정하는 conditions에 의해 trigger됩니다.
Count function전문 번역
increase누적 count를 증가시킵니다.
decrease누적 count를 감소시킵니다.
pulse-directionSignal A의 rising edges가 해당 count를 갱신하며 signal B의 input level이 direction을 결정합니다.
quadrature x1 aForward이면 quadrature pair signal A의 rising edges가, backward이면 signal A의 falling edges가 해당 count를 갱신합니다. Quadrature encoding이 direction을 결정합니다.
quadrature x1 bForward이면 quadrature pair signal B의 rising edges가, backward이면 signal B의 falling edges가 해당 count를 갱신합니다. Quadrature encoding이 direction을 결정합니다.
quadrature x2 aQuadrature pair signal A의 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다.
quadrature x2 bQuadrature pair signal B의 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다.
quadrature x4두 quadrature pair signals 중 어느 쪽이든 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다.
Signal action에서 Count update까지
Signal Z state transitionsignalZ_actionCount Y functionCount Y update
Quadrature A and B phasesDirection evaluationx1 / x2 / x4 decodingCount Y update

Signal Z의 edge condition이 function evaluation을 trigger하고 선택된 count function이 Count Y를 갱신합니다.

Count metadata, prescaler, preset와 actions

248-308
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/countY/name5.2 / [email protected]Count Y의 device-specific name을 나타내는 read-only attribute입니다. 가능하면 device datasheet에 나온 해당 channel 이름과 일치해야 합니다.
/sys/bus/counter/devices/counterX/countY/prescaler5.2 / [email protected]Count Y와 연관된 prescaler value를 구성합니다. FlexTimer에서는 counter clock source가 prescaler, 즉 counter를 통과하며 이는 clock divider처럼 동작합니다.
/sys/bus/counter/devices/counterX/countY/preset5.2 / [email protected]Counter device가 device-defined preset operation trigger events에서 counter channels에 정해진 count를 load하는 preset registers를 지원하면 이 attribute가 channel Y의 preset count를 제공합니다.
/sys/bus/counter/devices/counterX/countY/preset_enable5.2 / [email protected]Channel Y counter preset operation의 enable 여부입니다. 유효한 attribute 값은 boolean입니다.
/sys/bus/counter/devices/counterX/countY/signalZ_action5.2 / [email protected]Signal Z에 대한 Count Y의 action mode입니다. Count Y의 count function evaluation을 trigger하는 Signal Z condition을 나타냅니다.
/sys/bus/counter/devices/counterX/countY/num_overflows6.1 / [email protected]Count Y의 overflow 횟수를 나타냅니다.
signalZ_action전문 번역
noneSignal이 count function을 trigger하지 않습니다. Pulse-Direction count function mode에서는 이 Signal을 Direction으로 평가합니다.
rising edgeLow state에서 high state로 전환됩니다.
falling edgeHigh state에서 low state로 전환됩니다.
both edges모든 state transition입니다.

Extension과 Synapse component IDs

310-336
What paths
/sys/bus/counter/devices/counterX/cascade_counts_enable_component_id
/sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id
/sys/bus/counter/devices/counterX/countY/capture_component_id
/sys/bus/counter/devices/counterX/countY/ceiling_component_id
/sys/bus/counter/devices/counterX/countY/compare_component_id
/sys/bus/counter/devices/counterX/countY/count_mode_component_id
/sys/bus/counter/devices/counterX/countY/direction_component_id
/sys/bus/counter/devices/counterX/countY/enable_component_id
/sys/bus/counter/devices/counterX/countY/error_noise_component_id
/sys/bus/counter/devices/counterX/countY/floor_component_id
/sys/bus/counter/devices/counterX/countY/num_overflows_component_id
/sys/bus/counter/devices/counterX/countY/prescaler_component_id
/sys/bus/counter/devices/counterX/countY/preset_component_id
/sys/bus/counter/devices/counterX/countY/preset_enable_component_id
/sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
/sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
/sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
/sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
/sys/bus/counter/devices/counterX/signalY/frequency_component_id
/sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
/sys/bus/counter/devices/counterX/signalY/polarity_component_id
/sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
항목전문 번역
KernelVersion5.16
Contact[email protected]
Description해당 extension 또는 Synapse의 component ID를 나타내는 read-only attribute입니다.

Spike filter, event queue와 Counter metadata

338-375
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/countY/spike_filter_ns5.14 / [email protected]Counter device가 programmable spike filter를 지원하면 이 attribute는 구성된 값보다 짧거나 같은 noise pulses를 무시하는 nanoseconds 값을 나타냅니다. 0은 filter가 disable되었음을 의미합니다.
/sys/bus/counter/devices/counterX/events_queue_size5.16 / [email protected]struct counter_event data structures 개수로 나타낸 Counter events queue의 크기입니다. Element 수는 2의 거듭제곱으로 올림됩니다.
/sys/bus/counter/devices/counterX/name5.2 / [email protected]Counter의 device-specific name을 나타내는 read-only attribute입니다. 해당 datasheet에 나온 device 이름과 일치해야 합니다.
/sys/bus/counter/devices/counterX/num_counts5.2 / [email protected]Counter에 속한 Counts의 전체 개수를 나타내는 read-only attribute입니다.
/sys/bus/counter/devices/counterX/num_signals5.2 / [email protected]Counter에 속한 Signals의 전체 개수를 나타내는 read-only attribute입니다.

Signal Y fault, filter와 index configuration

377-415
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/signalY/cable_fault5.7 / [email protected]Signal Y의 해당 channel에서 differential encoder cable fault, 즉 연결되지 않았거나 느슨한 wires가 감지되었는지를 나타내는 read-only attribute입니다. 유효한 값은 boolean이며 먼저 해당 cable_fault_enable attribute로 detection을 enable해야 합니다.
/sys/bus/counter/devices/counterX/signalY/cable_fault_enable5.7 / [email protected]Signal Y의 해당 channel에서 differential encoder cable fault detection의 enable 여부입니다. 유효한 attribute 값은 boolean입니다.
/sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler5.7 / [email protected]Input Signal Y의 filter clock factor입니다. 이 prescaler value는 quadrature pair signals 양쪽 input에 영향을 줍니다.
/sys/bus/counter/devices/counterX/signalY/index_polarity5.2 / [email protected]Index input Signal Y의 active level입니다. Non-synchronous load mode에서는 관련이 없습니다.
/sys/bus/counter/devices/counterX/signalY/index_polarity_available5.2 / [email protected]해당 Signal Y configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다.
/sys/bus/counter/devices/counterX/signalY/synchronous_mode_available5.2 / [email protected]해당 Signal Y configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다.

Signal Y polarity, level, synchronization과 frequency

417-477
WhatKernel / Contact전문 번역
/sys/bus/counter/devices/counterX/signalY/polarity6.1 / [email protected]Signal Y의 active level입니다. positive는 signal high state를 active level, 즉 rising edge로 간주하고 negative는 signal low state를 active level, 즉 falling edge로 간주합니다.
/sys/bus/counter/devices/counterX/signalY/name5.2 / [email protected]Signal Y의 device-specific name을 나타내는 read-only attribute입니다. 가능하면 device datasheet에 나온 해당 signal 이름과 일치해야 합니다.
/sys/bus/counter/devices/counterX/signalY/signal5.2 / [email protected]Signal Y의 signal level state입니다. low는 low level state이고 high는 high level state입니다.
/sys/bus/counter/devices/counterX/signalY/synchronous_mode5.2 / [email protected]Signal Y와 연관된 counter를 non-synchronous 또는 synchronous load mode로 구성합니다. Non-quadrature(Pulse-Direction) clock mode에서는 synchronous load mode를 선택할 수 없습니다.
/sys/bus/counter/devices/counterX/signalY/frequency6.1 / [email protected]Signal Y frequency를 Hz 단위로 나타내는 read-only attribute입니다.
synchronous_mode전문 번역
non-synchronous이 index input에서는 logic low level이 active level입니다. preset_enable로 enable한 index function을 index input의 active level에서 직접 수행합니다.
synchronousQuadrature clock mode에서 encoder Index output과 연결하기 위한 mode입니다. Active level은 index_polarity로 구성합니다. preset_enable로 enable한 index function은 index input의 active level에서 quadrature clock과 동기하여 수행됩니다.