요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Count data, compare, capture와 limits
sysfs-bus-counter:31-63Count Y의 현재 count, compare·capture values와 ceiling·floor limits를 제공합니다.
Count mode semantics
sysfs-bus-counter:65-153Continuous, 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-199Count configuration의 available values와 direction, pause-style enable state, excessive input noise 상태를 제공합니다.
Count functions와 quadrature decoding
sysfs-bus-counter:201-246Increase/decrease, pulse-direction과 quadrature x1·x2·x4 functions에서 어떤 signal transition이 count를 갱신하는지 정의합니다.
Count naming, prescaler, preset와 actions
sysfs-bus-counter:248-308Count name, clock prescaler, preset operation, Signal Z action trigger와 overflow count를 설명합니다.
Extension과 Synapse component IDs
sysfs-bus-counter:310-336Device, Count, Signal extensions와 Synapse별 read-only component ID attributes를 정의합니다.
Filters, event queue와 device metadata
sysfs-bus-counter:338-375Spike filter threshold, power-of-two event queue size, device name과 Count·Signal totals를 제공합니다.
Signal fault, filter와 index configuration
sysfs-bus-counter:377-415Differential encoder cable faults, input filter prescaler, index polarity와 available Signal configuration values를 설명합니다.
Signal polarity, level, synchronization과 frequency
sysfs-bus-counter:417-477Signal active polarity와 level, device-specific name, synchronous index-load behavior와 frequency를 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/counter/devices/counterX/cascade_counts_enable
KernelVersion: 6.4
Contact: [email protected]
Description:
Indicates the cascading of Counts on Counter X.
Valid attribute values are boolean.
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select
KernelVersion: 6.4
Contact: [email protected]
Description:
Selects the external clock pin for phase counting mode of
Counter X.
MTCLKA-MTCLKB:
MTCLKA and MTCLKB pins are selected for the external
phase clock.
MTCLKC-MTCLKD:
MTCLKC and MTCLKD pins are selected for the external
phase clock.
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_available
KernelVersion: 6.4
Contact: [email protected]
Description:
Discrete set of available values for the respective device
configuration are listed in this file.
What: /sys/bus/counter/devices/counterX/countY/count
KernelVersion: 5.2
Contact: [email protected]
Description:
Count data of Count Y represented as a string.
What: /sys/bus/counter/devices/counterX/countY/compare
KernelVersion: 6.15
Contact: [email protected]
Description:
If the counter device supports compare registers -- registers
used to compare counter channels against a particular count --
the compare count for channel Y is provided by this attribute.
What: /sys/bus/counter/devices/counterX/countY/capture
KernelVersion: 6.1
Contact: [email protected]
Description:
Historical capture of the Count Y count data.
What: /sys/bus/counter/devices/counterX/countY/ceiling
KernelVersion: 5.2
Contact: [email protected]
Description:
Count value ceiling for Count Y. This is the upper limit for the
respective counter.
What: /sys/bus/counter/devices/counterX/countY/floor
KernelVersion: 5.2
Contact: [email protected]
Description:
Count value floor for Count Y. This is the lower limit for the
respective counter.
What: /sys/bus/counter/devices/counterX/countY/count_mode
KernelVersion: 5.2
Contact: [email protected]
Description:
Count mode for channel Y. The ceiling and floor values for
Count Y are used by the count mode where required. The following
count modes are available:
normal:
Counting is continuous in either direction.
range limit:
An upper or lower limit is set, mimicking limit switches
in the mechanical counterpart. The upper limit is set to
the Count Y ceiling value, while the lower limit is set
to the Count Y floor value. The counter freezes at
count = ceiling when counting up, and at count = floor
when counting down. At either of these limits, the
counting is resumed only when the count direction is
reversed.
non-recycle:
The counter is disabled whenever a counter overflow or
underflow takes place. The counter is re-enabled when a
new count value is loaded to the counter via a preset
operation or direct write.
modulo-n:
A count value boundary is set between the Count Y floor
value and the Count Y ceiling value. The counter is
reset to the Count Y floor value at count = ceiling when
counting up, while the counter is set to the Count Y
ceiling value at count = floor when counting down; the
counter does not freeze at the boundary points, but
counts continuously throughout.
interrupt on terminal count:
The output signal is initially low, and will remain low
until the counter reaches zero. The output signal then
goes high and remains high until a new preset value is
set.
hardware retriggerable one-shot:
The output signal is initially high. The output signal
will go low by a trigger input signal, and will remain
low until the counter reaches zero. The output will then
go high and remain high until the next trigger. A
trigger results in loading the counter to the preset
value and setting the output signal low, thus starting
the one-shot pulse.
rate generator:
The output signal is initially high. When the counter
has decremented to 1, the output signal goes low for one
clock pulse. The output signal then goes high again, the
counter is reloaded to the preset value, and the process
repeats in a periodic manner as such.
square wave mode:
The output signal is initially high.
If the initial count is even, the counter is decremented
by two on succeeding clock pulses. When the count
expires, the output signal changes value and the
counter is reloaded to the preset value. The process
repeats in periodic manner as such.
If the initial count is odd, the initial count minus one
(an even number) is loaded and then is decremented by
two on succeeding clock pulses. One clock pulse after
the count expires, the output signal goes low and the
counter is reloaded to the preset value minus one.
Succeeding clock pulses decrement the count by two. When
the count expires, the output goes high again and the
counter is reloaded to the preset value minus one. The
process repeats in a periodic manner as such.
software triggered strobe:
The output signal is initially high. When the count
expires, the output will go low for one clock pulse and
then go high again. The counting sequence is "triggered"
by setting the preset value.
hardware triggered strobe:
The output signal is initially high. Counting is started
by a trigger input signal. When the count expires, the
output signal will go low for one clock pulse and then
go high again. A trigger results in loading the counter
to the preset value.
What: /sys/bus/counter/devices/counterX/countY/count_mode_available
What: /sys/bus/counter/devices/counterX/countY/error_noise_available
What: /sys/bus/counter/devices/counterX/countY/function_available
What: /sys/bus/counter/devices/counterX/countY/prescaler_available
What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
KernelVersion: 5.2
Contact: [email protected]
Description:
Discrete set of available values for the respective Count Y
configuration are listed in this file. Values are delimited by
newline characters.
What: /sys/bus/counter/devices/counterX/countY/direction
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the count direction of Count
Y. Two count directions are available: forward and backward.
Some counter devices are able to determine the direction of
their counting. For example, quadrature encoding counters can
determine the direction of movement by evaluating the leading
phase of the respective A and B quadrature encoding signals.
This attribute exposes such count directions.
What: /sys/bus/counter/devices/counterX/countY/enable
KernelVersion: 5.2
Contact: [email protected]
Description:
Whether channel Y counter is enabled. Valid attribute values are
boolean.
This attribute is intended to serve as a pause/unpause mechanism
for Count Y. Suppose a counter device is used to count the total
movement of a conveyor belt: this attribute allows an operator
to temporarily pause the counter, service the conveyor belt,
and then finally unpause the counter to continue where it had
left off.
What: /sys/bus/counter/devices/counterX/countY/error_noise
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates whether excessive noise is
present at the channel Y counter inputs.
What: /sys/bus/counter/devices/counterX/countY/function
KernelVersion: 5.2
Contact: [email protected]
Description:
Count function mode of Count Y; count function evaluation is
triggered by conditions specified by the Count Y signalZ_action
attributes. The following count functions are available:
increase:
Accumulated count is incremented.
decrease:
Accumulated count is decremented.
pulse-direction:
Rising edges on signal A updates the respective count.
The input level of signal B determines direction.
quadrature x1 a:
If direction is forward, rising edges on quadrature pair
signal A updates the respective count; if the direction
is backward, falling edges on quadrature pair signal A
updates the respective count. Quadrature encoding
determines the direction.
quadrature x1 b:
If direction is forward, rising edges on quadrature pair
signal B updates the respective count; if the direction
is backward, falling edges on quadrature pair signal B
updates the respective count. Quadrature encoding
determines the direction.
quadrature x2 a:
Any state transition on quadrature pair signal A updates
the respective count. Quadrature encoding determines the
direction.
quadrature x2 b:
Any state transition on quadrature pair signal B updates
the respective count. Quadrature encoding determines the
direction.
quadrature x4:
Any state transition on either quadrature pair signals
updates the respective count. Quadrature encoding
determines the direction.
What: /sys/bus/counter/devices/counterX/countY/name
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the device-specific name of
Count Y. If possible, this should match the name of the
respective channel as it appears in the device datasheet.
What: /sys/bus/counter/devices/counterX/countY/prescaler
KernelVersion: 5.2
Contact: [email protected]
Description:
Configure the prescaler value associated with Count Y.
On the FlexTimer, the counter clock source passes through a
prescaler (i.e. a counter). This acts like a clock
divider.
What: /sys/bus/counter/devices/counterX/countY/preset
KernelVersion: 5.2
Contact: [email protected]
Description:
If the counter device supports preset registers -- registers
used to load counter channels to a set count upon device-defined
preset operation trigger events -- the preset count for channel
Y is provided by this attribute.
What: /sys/bus/counter/devices/counterX/countY/preset_enable
KernelVersion: 5.2
Contact: [email protected]
Description:
Whether channel Y counter preset operation is enabled. Valid
attribute values are boolean.
What: /sys/bus/counter/devices/counterX/countY/signalZ_action
KernelVersion: 5.2
Contact: [email protected]
Description:
Action mode of Count Y for Signal Z. This attribute indicates
the condition of Signal Z that triggers the count function
evaluation for Count Y. The following action modes are
available:
none:
Signal does not trigger the count function. In
Pulse-Direction count function mode, this Signal is
evaluated as Direction.
rising edge:
Low state transitions to high state.
falling edge:
High state transitions to low state.
both edges:
Any state transition.
What: /sys/bus/counter/devices/counterX/countY/num_overflows
KernelVersion: 6.1
Contact: [email protected]
Description:
This attribute indicates the number of overflows of count Y.
What: /sys/bus/counter/devices/counterX/cascade_counts_enable_component_id
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id
What: /sys/bus/counter/devices/counterX/countY/capture_component_id
What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
What: /sys/bus/counter/devices/counterX/countY/compare_component_id
What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
What: /sys/bus/counter/devices/counterX/countY/direction_component_id
What: /sys/bus/counter/devices/counterX/countY/enable_component_id
What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
What: /sys/bus/counter/devices/counterX/countY/floor_component_id
What: /sys/bus/counter/devices/counterX/countY/num_overflows_component_id
What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
What: /sys/bus/counter/devices/counterX/countY/preset_component_id
What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
What: /sys/bus/counter/devices/counterX/signalY/frequency_component_id
What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
What: /sys/bus/counter/devices/counterX/signalY/polarity_component_id
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
KernelVersion: 5.16
Contact: [email protected]
Description:
Read-only attribute that indicates the component ID of the
respective extension or Synapse.
What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
KernelVersion: 5.14
Contact: [email protected]
Description:
If the counter device supports programmable spike filter this
attribute indicates the value in nanoseconds where noise pulses
shorter or equal to configured value are ignored. Value 0 means
filter is disabled.
What: /sys/bus/counter/devices/counterX/events_queue_size
KernelVersion: 5.16
Contact: [email protected]
Description:
Size of the Counter events queue in number of struct
counter_event data structures. The number of elements will be
rounded-up to a power of 2.
What: /sys/bus/counter/devices/counterX/name
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the device-specific name of
the Counter. This should match the name of the device as it
appears in its respective datasheet.
What: /sys/bus/counter/devices/counterX/num_counts
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the total number of Counts
belonging to the Counter.
What: /sys/bus/counter/devices/counterX/num_signals
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the total number of Signals
belonging to the Counter.
What: /sys/bus/counter/devices/counterX/signalY/cable_fault
KernelVersion: 5.7
Contact: [email protected]
Description:
Read-only attribute that indicates whether a differential
encoder cable fault (not connected or loose wires) is detected
for the respective channel of Signal Y. Valid attribute values
are boolean. Detection must first be enabled via the
corresponding cable_fault_enable attribute.
What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
KernelVersion: 5.7
Contact: [email protected]
Description:
Whether detection of differential encoder cable faults for the
respective channel of Signal Y is enabled. Valid attribute
values are boolean.
What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
KernelVersion: 5.7
Contact: [email protected]
Description:
Filter clock factor for input Signal Y. This prescaler value
affects the inputs of both quadrature pair signals.
What: /sys/bus/counter/devices/counterX/signalY/index_polarity
KernelVersion: 5.2
Contact: [email protected]
Description:
Active level of index input Signal Y; irrelevant in
non-synchronous load mode.
What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
KernelVersion: 5.2
Contact: [email protected]
Description:
Discrete set of available values for the respective Signal Y
configuration are listed in this file.
What: /sys/bus/counter/devices/counterX/signalY/polarity
KernelVersion: 6.1
Contact: [email protected]
Description:
Active level of Signal Y. The following polarity values are
available:
positive:
Signal high state considered active level (rising edge).
negative:
Signal low state considered active level (falling edge).
What: /sys/bus/counter/devices/counterX/signalY/name
KernelVersion: 5.2
Contact: [email protected]
Description:
Read-only attribute that indicates the device-specific name of
Signal Y. If possible, this should match the name of the
respective signal as it appears in the device datasheet.
What: /sys/bus/counter/devices/counterX/signalY/signal
KernelVersion: 5.2
Contact: [email protected]
Description:
Signal level state of Signal Y. The following signal level
states are available:
low:
Low level state.
high:
High level state.
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
KernelVersion: 5.2
Contact: [email protected]
Description:
Configure the counter associated with Signal Y for
non-synchronous or synchronous load mode. Synchronous load mode
cannot be selected in non-quadrature (Pulse-Direction) clock
mode.
non-synchronous:
A logic low level is the active level at this index
input. The index function (as enabled via preset_enable)
is performed directly on the active level of the index
input.
synchronous:
Intended for interfacing with encoder Index output in
quadrature clock mode. The active level is configured
via index_polarity. The index function (as enabled via
preset_enable) is performed synchronously with the
quadrature clock on the active level of the index input.
What: /sys/bus/counter/devices/counterX/signalY/frequency
KernelVersion: 6.1
Contact: [email protected]
Description:
Read-only attribute that indicates the signal Y frequency, in Hz.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Counter device-level configuration
1-29| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/cascade_counts_enable | 6.4 / [email protected] | Counter X에서 Counts의 cascading 여부를 나타냅니다. 유효한 attribute 값은 boolean입니다. |
| /sys/bus/counter/devices/counterX/external_input_phase_clock_select | 6.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_available | 6.4 / [email protected] | 해당 device configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다. |
Count Y values와 limits
31-63| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/countY/count | 5.2 / [email protected] | 문자열로 표현한 Count Y의 count data입니다. |
| /sys/bus/counter/devices/counterX/countY/compare | 6.15 / [email protected] | Counter device가 특정 count와 counter channels를 비교하는 compare registers를 지원하면 이 attribute가 channel Y의 compare count를 제공합니다. |
| /sys/bus/counter/devices/counterX/countY/capture | 6.1 / [email protected] | Count Y count data의 historical capture입니다. |
| /sys/bus/counter/devices/counterX/countY/ceiling | 5.2 / [email protected] | Count Y의 count value ceiling입니다. 해당 counter의 upper limit입니다. |
| /sys/bus/counter/devices/counterX/countY/floor | 5.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 |
| KernelVersion | 5.2 |
| Contact | [email protected] |
| Description | Channel 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-recycle | Counter overflow 또는 underflow가 발생하면 counter를 disable합니다. Preset operation이나 직접 쓰기로 새 count value를 load하면 counter를 다시 enable합니다. |
| modulo-n | Count Y floor와 ceiling 사이에 count boundary를 둡니다. 위로 셀 때 count = ceiling에서 floor로 reset하고, 아래로 셀 때 count = floor에서 ceiling으로 설정합니다. Boundary points에서 멈추지 않고 계속 counting합니다. |
| interrupt on terminal count | Output signal은 처음에 low이고 counter가 0에 도달할 때까지 low를 유지합니다. 그 뒤 high가 되어 새 preset value를 설정할 때까지 high를 유지합니다. |
| hardware retriggerable one-shot | Output signal은 처음에 high입니다. Trigger input signal이 들어오면 low가 되고 counter가 0에 도달할 때까지 low를 유지한 뒤 다음 trigger까지 high를 유지합니다. Trigger는 counter에 preset value를 load하고 output을 low로 설정하여 one-shot pulse를 시작합니다. |
| rate generator | Output signal은 처음에 high입니다. Counter가 1까지 감소하면 한 clock pulse 동안 low가 됩니다. 이어서 다시 high가 되고 counter는 preset value로 reload되며 이 과정이 주기적으로 반복됩니다. |
| square wave mode | Output 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 strobe | Output signal은 처음에 high입니다. Count가 만료되면 한 clock pulse 동안 low가 되었다가 다시 high가 됩니다. Preset value 설정이 counting sequence를 trigger합니다. |
| hardware triggered strobe | Output signal은 처음에 high입니다. Trigger input signal이 counting을 시작하며 count가 만료되면 한 clock pulse 동안 low가 되었다가 다시 high가 됩니다. Trigger는 counter에 preset value를 load합니다. |
Count configuration과 runtime state
155-199| 공통 available-value paths | Kernel / Contact |
|---|---|
| /sys/bus/counter/devices/counterX/countY/count_mode_available | 5.2 / [email protected] |
| /sys/bus/counter/devices/counterX/countY/error_noise_available | 5.2 / [email protected] |
| /sys/bus/counter/devices/counterX/countY/function_available | 5.2 / [email protected] |
| /sys/bus/counter/devices/counterX/countY/prescaler_available | 5.2 / [email protected] |
| /sys/bus/counter/devices/counterX/countY/signalZ_action_available | 5.2 / [email protected] |
위 files에는 해당 Count Y configuration에서 사용할 수 있는 discrete values 집합을 나열하며 values는 newline characters로 구분합니다.
| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/countY/direction | 5.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/enable | 5.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_noise | 5.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 |
| KernelVersion | 5.2 |
| Contact | [email protected] |
| Description | Count Y의 count function mode입니다. Count function 평가는 Count Y의 signalZ_action attributes가 지정하는 conditions에 의해 trigger됩니다. |
| Count function | 전문 번역 |
|---|---|
| increase | 누적 count를 증가시킵니다. |
| decrease | 누적 count를 감소시킵니다. |
| pulse-direction | Signal A의 rising edges가 해당 count를 갱신하며 signal B의 input level이 direction을 결정합니다. |
| quadrature x1 a | Forward이면 quadrature pair signal A의 rising edges가, backward이면 signal A의 falling edges가 해당 count를 갱신합니다. Quadrature encoding이 direction을 결정합니다. |
| quadrature x1 b | Forward이면 quadrature pair signal B의 rising edges가, backward이면 signal B의 falling edges가 해당 count를 갱신합니다. Quadrature encoding이 direction을 결정합니다. |
| quadrature x2 a | Quadrature pair signal A의 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다. |
| quadrature x2 b | Quadrature pair signal B의 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다. |
| quadrature x4 | 두 quadrature pair signals 중 어느 쪽이든 모든 state transition이 해당 count를 갱신하며 quadrature encoding이 direction을 결정합니다. |
Signal Z의 edge condition이 function evaluation을 trigger하고 선택된 count function이 Count Y를 갱신합니다.
Count metadata, prescaler, preset와 actions
248-308| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/countY/name | 5.2 / [email protected] | Count Y의 device-specific name을 나타내는 read-only attribute입니다. 가능하면 device datasheet에 나온 해당 channel 이름과 일치해야 합니다. |
| /sys/bus/counter/devices/counterX/countY/prescaler | 5.2 / [email protected] | Count Y와 연관된 prescaler value를 구성합니다. FlexTimer에서는 counter clock source가 prescaler, 즉 counter를 통과하며 이는 clock divider처럼 동작합니다. |
| /sys/bus/counter/devices/counterX/countY/preset | 5.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_enable | 5.2 / [email protected] | Channel Y counter preset operation의 enable 여부입니다. 유효한 attribute 값은 boolean입니다. |
| /sys/bus/counter/devices/counterX/countY/signalZ_action | 5.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_overflows | 6.1 / [email protected] | Count Y의 overflow 횟수를 나타냅니다. |
| signalZ_action | 전문 번역 |
|---|---|
| none | Signal이 count function을 trigger하지 않습니다. Pulse-Direction count function mode에서는 이 Signal을 Direction으로 평가합니다. |
| rising edge | Low state에서 high state로 전환됩니다. |
| falling edge | High 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 |
| 항목 | 전문 번역 |
|---|---|
| KernelVersion | 5.16 |
| Contact | [email protected] |
| Description | 해당 extension 또는 Synapse의 component ID를 나타내는 read-only attribute입니다. |
Spike filter, event queue와 Counter metadata
338-375| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/countY/spike_filter_ns | 5.14 / [email protected] | Counter device가 programmable spike filter를 지원하면 이 attribute는 구성된 값보다 짧거나 같은 noise pulses를 무시하는 nanoseconds 값을 나타냅니다. 0은 filter가 disable되었음을 의미합니다. |
| /sys/bus/counter/devices/counterX/events_queue_size | 5.16 / [email protected] | struct counter_event data structures 개수로 나타낸 Counter events queue의 크기입니다. Element 수는 2의 거듭제곱으로 올림됩니다. |
| /sys/bus/counter/devices/counterX/name | 5.2 / [email protected] | Counter의 device-specific name을 나타내는 read-only attribute입니다. 해당 datasheet에 나온 device 이름과 일치해야 합니다. |
| /sys/bus/counter/devices/counterX/num_counts | 5.2 / [email protected] | Counter에 속한 Counts의 전체 개수를 나타내는 read-only attribute입니다. |
| /sys/bus/counter/devices/counterX/num_signals | 5.2 / [email protected] | Counter에 속한 Signals의 전체 개수를 나타내는 read-only attribute입니다. |
Signal Y fault, filter와 index configuration
377-415| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/signalY/cable_fault | 5.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_enable | 5.7 / [email protected] | Signal Y의 해당 channel에서 differential encoder cable fault detection의 enable 여부입니다. 유효한 attribute 값은 boolean입니다. |
| /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler | 5.7 / [email protected] | Input Signal Y의 filter clock factor입니다. 이 prescaler value는 quadrature pair signals 양쪽 input에 영향을 줍니다. |
| /sys/bus/counter/devices/counterX/signalY/index_polarity | 5.2 / [email protected] | Index input Signal Y의 active level입니다. Non-synchronous load mode에서는 관련이 없습니다. |
| /sys/bus/counter/devices/counterX/signalY/index_polarity_available | 5.2 / [email protected] | 해당 Signal Y configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다. |
| /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available | 5.2 / [email protected] | 해당 Signal Y configuration에서 사용할 수 있는 discrete values 집합을 이 file에 나열합니다. |
Signal Y polarity, level, synchronization과 frequency
417-477| What | Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/counter/devices/counterX/signalY/polarity | 6.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/name | 5.2 / [email protected] | Signal Y의 device-specific name을 나타내는 read-only attribute입니다. 가능하면 device datasheet에 나온 해당 signal 이름과 일치해야 합니다. |
| /sys/bus/counter/devices/counterX/signalY/signal | 5.2 / [email protected] | Signal Y의 signal level state입니다. low는 low level state이고 high는 high level state입니다. |
| /sys/bus/counter/devices/counterX/signalY/synchronous_mode | 5.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/frequency | 6.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에서 직접 수행합니다. |
| synchronous | Quadrature clock mode에서 encoder Index output과 연결하기 위한 mode입니다. Active level은 index_polarity로 구성합니다. preset_enable로 enable한 index function은 index input의 active level에서 quadrature clock과 동기하여 수행됩니다. |
Counter device configuration
sysfs-bus-counter:1-29Counter cascading을 enable하고 phase-counting mode의 external clock pin pair를 선택하며 지원되는 configuration values를 조회합니다.