← Documents Documentation/iio/adis16550.rst GitHub 원문 ↗

Linux 6.18.37 · IIO

ADIS16550 driver

ADIS16550 IMU의 관성·delta 채널, 축별 보정, 필터, 진단과 burst 버퍼를 설명합니다.

Source pathDocumentation/iio/adis16550.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

adis16550.rst:1-376

ADIS16550 드라이버는 3축 가속도·각속도, delta velocity·delta angle과 온도를 제공합니다. 축별 바이어스·배율 보정, 공통 저역 통과 필터, debugfs 진단 및 상호 배타적인 일반·delta burst 버퍼를 지원합니다.

문서 개요
항목
SourceDocumentation/iio/adis16550.rst
분량376 source lines
지원 장치ADIS16550
처리값 채널 유형5
Burst 모드일반 관성 또는 delta

지원 범위와 핵심 제약을 요약합니다.

통합 IMU 흐름
3축 가속도·각속도와 온도 취득공장 보상과 축별 사용자 보정 적용Raw·offset·scale로 처리값 계산일반 또는 delta burst 선택Sysfs 또는 IIO buffer에서 결과 수집

센서 취득부터 물리값 또는 버퍼 읽기까지의 전체 경로입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ================
4 ADIS16550 driver
5 ================
6
7 This driver supports Analog Device's IMUs on SPI bus.
8
9 1. Supported devices
10 ====================
11
12 * `ADIS16550 <https://www.analog.com/ADIS16550>`_
13
14 The ADIS16550 is a complete inertial system that includes a triaxis gyroscope
15 and a triaxis accelerometer. The factory calibration characterizes each sensor for
16 sensitivity, bias, and alignment. As a result, each sensor has its own dynamic
17 compensation formulas that provide accurate sensor measurements.
18
19 2. Device attributes
20 ====================
21
22 Accelerometer, gyroscope measurements are always provided. Furthermore, the
23 driver offers the capability to retrieve the delta angle and the delta velocity
24 measurements computed by the device.
25
26 The delta angle measurements represent a calculation of angular displacement
27 between each sample update, while the delta velocity measurements represent a
28 calculation of linear velocity change between each sample update.
29
30 Finally, temperature data are provided which show a coarse measurement of
31 the temperature inside of the IMU device. This data is most useful for
32 monitoring relative changes in the thermal environment.
33
34 Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
35 where X is the IIO index of the device. Under these folders reside a set of
36 device files, depending on the characteristics and features of the hardware
37 device in questions. These files are consistently generalized and documented in
38 the IIO ABI documentation.
39
40 The following tables show the adis16550 related device files, found in the
41 specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.
42
43 +-------------------------------------------+----------------------------------------------------------+
44 | 3-Axis Accelerometer related device files | Description |
45 +-------------------------------------------+----------------------------------------------------------+
46 | in_accel_scale | Scale for the accelerometer channels. |
47 +-------------------------------------------+----------------------------------------------------------+
48 | in_accel_filter_low_pass_3db_frequency | Bandwidth for the accelerometer channels. |
49 +-------------------------------------------+----------------------------------------------------------+
50 | in_accel_x_calibbias | Calibration offset for the X-axis accelerometer channel. |
51 +-------------------------------------------+----------------------------------------------------------+
52 | in_accel_x_calibscale | Calibration scale for the X-axis accelerometer channel. |
53 +-------------------------------------------+----------------------------------------------------------+
54 | in_accel_x_raw | Raw X-axis accelerometer channel value. |
55 +-------------------------------------------+----------------------------------------------------------+
56 | in_accel_y_calibbias | Calibration offset for the Y-axis accelerometer channel. |
57 +-------------------------------------------+----------------------------------------------------------+
58 | in_accel_y_calibscale | Calibration scale for the Y-axis accelerometer channel. |
59 +-------------------------------------------+----------------------------------------------------------+
60 | in_accel_y_raw | Raw Y-axis accelerometer channel value. |
61 +-------------------------------------------+----------------------------------------------------------+
62 | in_accel_z_calibbias | Calibration offset for the Z-axis accelerometer channel. |
63 +-------------------------------------------+----------------------------------------------------------+
64 | in_accel_z_calibscale | Calibration scale for the Z-axis accelerometer channel. |
65 +-------------------------------------------+----------------------------------------------------------+
66 | in_accel_z_raw | Raw Z-axis accelerometer channel value. |
67 +-------------------------------------------+----------------------------------------------------------+
68 | in_deltavelocity_scale | Scale for delta velocity channels. |
69 +-------------------------------------------+----------------------------------------------------------+
70 | in_deltavelocity_x_raw | Raw X-axis delta velocity channel value. |
71 +-------------------------------------------+----------------------------------------------------------+
72 | in_deltavelocity_y_raw | Raw Y-axis delta velocity channel value. |
73 +-------------------------------------------+----------------------------------------------------------+
74 | in_deltavelocity_z_raw | Raw Z-axis delta velocity channel value. |
75 +-------------------------------------------+----------------------------------------------------------+
76
77 +--------------------------------------------+------------------------------------------------------+
78 | 3-Axis Gyroscope related device files | Description |
79 +--------------------------------------------+------------------------------------------------------+
80 | in_anglvel_scale | Scale for the gyroscope channels. |
81 +--------------------------------------------+------------------------------------------------------+
82 | in_anglvel_filter_low_pass_3db_frequency | Scale for the gyroscope channels. |
83 +--------------------------------------------+------------------------------------------------------+
84 | in_anglvel_x_calibbias | Calibration offset for the X-axis gyroscope channel. |
85 +--------------------------------------------+------------------------------------------------------+
86 | in_anglvel_x_calibscale | Calibration scale for the X-axis gyroscope channel. |
87 +--------------------------------------------+------------------------------------------------------+
88 | in_anglvel_x_raw | Raw X-axis gyroscope channel value. |
89 +--------------------------------------------+------------------------------------------------------+
90 | in_anglvel_y_calibbias | Calibration offset for the Y-axis gyroscope channel. |
91 +--------------------------------------------+------------------------------------------------------+
92 | in_anglvel_y_calibscale | Calibration scale for the Y-axis gyroscope channel. |
93 +--------------------------------------------+------------------------------------------------------+
94 | in_anglvel_y_raw | Raw Y-axis gyroscope channel value. |
95 +--------------------------------------------+------------------------------------------------------+
96 | in_anglvel_z_calibbias | Calibration offset for the Z-axis gyroscope channel. |
97 +--------------------------------------------+------------------------------------------------------+
98 | in_anglvel_z_calibscale | Calibration scale for the Z-axis gyroscope channel. |
99 +--------------------------------------------+------------------------------------------------------+
100 | in_anglvel_z_raw | Raw Z-axis gyroscope channel value. |
101 +--------------------------------------------+------------------------------------------------------+
102 | in_deltaangl_scale | Scale for delta angle channels. |
103 +--------------------------------------------+------------------------------------------------------+
104 | in_deltaangl_x_raw | Raw X-axis delta angle channel value. |
105 +--------------------------------------------+------------------------------------------------------+
106 | in_deltaangl_y_raw | Raw Y-axis delta angle channel value. |
107 +--------------------------------------------+------------------------------------------------------+
108 | in_deltaangl_z_raw | Raw Z-axis delta angle channel value. |
109 +--------------------------------------------+------------------------------------------------------+
110
111 +----------------------------------+-------------------------------------------+
112 | Temperature sensor related files | Description |
113 +----------------------------------+-------------------------------------------+
114 | in_temp0_raw | Raw temperature channel value. |
115 +----------------------------------+-------------------------------------------+
116 | in_temp0_offset | Offset for the temperature sensor channel.|
117 +----------------------------------+-------------------------------------------+
118 | in_temp0_scale | Scale for the temperature sensor channel. |
119 +----------------------------------+-------------------------------------------+
120
121 +----------------------------+--------------------------------------------------------------------------------+
122 | Miscellaneous device files | Description |
123 +----------------------------+--------------------------------------------------------------------------------+
124 | name | Name of the IIO device. |
125 +----------------------------+--------------------------------------------------------------------------------+
126 | sampling_frequency | Currently selected sample rate. |
127 +----------------------------+--------------------------------------------------------------------------------+
128
129 The following table shows the adis16550 related device debug files, found in the
130 specific device debug folder path ``/sys/kernel/debug/iio/iio:deviceX``.
131
132 +----------------------+-------------------------------------------------------------------------+
133 | Debugfs device files | Description |
134 +----------------------+-------------------------------------------------------------------------+
135 | serial_number | The serial number of the chip in hexadecimal format. |
136 +----------------------+-------------------------------------------------------------------------+
137 | product_id | Chip specific product id (16550). |
138 +----------------------+-------------------------------------------------------------------------+
139 | flash_count | The number of flash writes performed on the device. |
140 +----------------------+-------------------------------------------------------------------------+
141 | firmware_revision | String containing the firmware revision in the following format ##.##. |
142 +----------------------+-------------------------------------------------------------------------+
143 | firmware_date | String containing the firmware date in the following format mm-dd-yyyy. |
144 +----------------------+-------------------------------------------------------------------------+
145
146 Channels processed values
147 -------------------------
148
149 A channel value can be read from its _raw attribute. The value returned is the
150 raw value as reported by the devices. To get the processed value of the channel,
151 apply the following formula:
152
153 .. code-block:: bash
154
155 processed value = (_raw + _offset) * _scale
156
157 Where _offset and _scale are device attributes. If no _offset attribute is
158 present, simply assume its value is 0.
159
160 The adis16550 driver offers data for 5 types of channels, the table below shows
161 the measurement units for the processed value, which are defined by the IIO
162 framework:
163
164 +--------------------------------------+---------------------------+
165 | Channel type | Measurement unit |
166 +--------------------------------------+---------------------------+
167 | Acceleration on X, Y, and Z axis | Meters per Second squared |
168 +--------------------------------------+---------------------------+
169 | Angular velocity on X, Y and Z axis | Radians per second |
170 +--------------------------------------+---------------------------+
171 | Delta velocity on X. Y, and Z axis | Meters per Second |
172 +--------------------------------------+---------------------------+
173 | Delta angle on X, Y, and Z axis | Radians |
174 +--------------------------------------+---------------------------+
175 | Temperature | Millidegrees Celsius |
176 +--------------------------------------+---------------------------+
177
178 Usage examples
179 --------------
180
181 Show device name:
182
183 .. code-block:: bash
184
185 root:/sys/bus/iio/devices/iio:device0> cat name
186 adis16550
187
188 Show accelerometer channels value:
189
190 .. code-block:: bash
191
192 root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
193 6903851
194 root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
195 5650550
196 root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
197 104873530
198 root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
199 0.000000095
200
201 - X-axis acceleration = in_accel_x_raw * in_accel_scale = 0.655865845 m/s^2
202 - Y-axis acceleration = in_accel_y_raw * in_accel_scale = 0.53680225 m/s^2
203 - Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.96298535 m/s^2
204
205 Show gyroscope channels value:
206
207 .. code-block:: bash
208
209 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_x_raw
210 193309
211 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_raw
212 -763676
213 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_z_raw
214 -358108
215 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_scale
216 0.000000003
217
218 - X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = 0.000579927 rad/s
219 - Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = −0.002291028 rad/s
220 - Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = −0.001074324 rad/s
221
222 Set calibration offset for accelerometer channels:
223
224 .. code-block:: bash
225
226 root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
227 0
228
229 root:/sys/bus/iio/devices/iio:device0> echo 5000 > in_accel_x_calibbias
230 root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
231 5000
232
233 Set calibration offset for gyroscope channels:
234
235 .. code-block:: bash
236
237 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
238 0
239
240 root:/sys/bus/iio/devices/iio:device0> echo -5000 > in_anglvel_y_calibbias
241 root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
242 -5000
243
244 Set sampling frequency:
245
246 .. code-block:: bash
247
248 root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
249 4000.000000
250
251 root:/sys/bus/iio/devices/iio:device0> echo 1000 > sampling_frequency
252 1000.000000
253
254 Set bandwidth for accelerometer channels:
255
256 .. code-block:: bash
257
258 root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
259 0
260
261 root:/sys/bus/iio/devices/iio:device0> echo 100 > in_accel_filter_low_pass_3db_frequency
262 root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
263 100
264
265 Show serial number:
266
267 .. code-block:: bash
268
269 root:/sys/kernel/debug/iio/iio:device0> cat serial_number
270 0x000000b6
271
272 Show product id:
273
274 .. code-block:: bash
275
276 root:/sys/kernel/debug/iio/iio:device0> cat product_id
277 16550
278
279 Show flash count:
280
281 .. code-block:: bash
282
283 root:/sys/kernel/debug/iio/iio:device0> cat flash_count
284 13
285
286 Show firmware revision:
287
288 .. code-block:: bash
289
290 root:/sys/kernel/debug/iio/iio:device0> cat firmware_revision
291 1.5
292
293 Show firmware date:
294
295 .. code-block:: bash
296
297 root:/sys/kernel/debug/iio/iio:device0> cat firmware_date
298 28-04-2021
299
300 3. Device buffers
301 =================
302
303 This driver supports IIO buffers.
304
305 The device supports retrieving the raw acceleration, gyroscope, delta velocity,
306 delta angle and temperature measurements using buffers.
307
308 However, when retrieving acceleration or gyroscope data using buffers, delta
309 readings will not be available and vice versa. This is because the device only
310 allows to read either acceleration and gyroscope data or delta velocity and
311 delta angle data at a time and switching between these two burst data selection
312 modes is time consuming.
313
314 Usage examples
315 --------------
316
317 Set device trigger in current_trigger, if not already set:
318
319 .. code-block:: bash
320
321 root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
322
323 root:/sys/bus/iio/devices/iio:device0> echo adis16550-dev0 > trigger/current_trigger
324 root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
325 adis16550-dev0
326
327 Select channels for buffer read:
328
329 .. code-block:: bash
330
331 root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_x_en
332 root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_y_en
333 root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_z_en
334 root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp0_en
335
336 Set the number of samples to be stored in the buffer:
337
338 .. code-block:: bash
339
340 root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
341
342 Enable buffer readings:
343
344 .. code-block:: bash
345
346 root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable
347
348 Obtain buffered data:
349
350 .. code-block:: bash
351
352 root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
353 ...
354 0000cdf0 00 00 0d 2f 00 00 08 43 00 00 09 09 00 00 a4 5f |.../...C......._|
355 0000ce00 00 00 0d 2f 00 00 07 de 00 00 08 db 00 00 a4 4b |.../...........K|
356 0000ce10 00 00 0d 2f 00 00 07 58 00 00 08 a3 00 00 a4 55 |.../...X.......U|
357 0000ce20 00 00 0d 2f 00 00 06 d6 00 00 08 5c 00 00 a4 62 |.../.......\...b|
358 0000ce30 00 00 0d 2f 00 00 06 45 00 00 08 37 00 00 a4 47 |.../...E...7...G|
359 0000ce40 00 00 0d 2f 00 00 05 d4 00 00 08 30 00 00 a3 fa |.../.......0....|
360 0000ce50 00 00 0d 2f 00 00 05 d0 00 00 08 12 00 00 a3 d3 |.../............|
361 0000ce60 00 00 0d 2f 00 00 05 dd 00 00 08 2e 00 00 a3 e9 |.../............|
362 0000ce70 00 00 0d 2f 00 00 05 cc 00 00 08 51 00 00 a3 d5 |.../.......Q....|
363 0000ce80 00 00 0d 2f 00 00 05 ba 00 00 08 22 00 00 a3 9a |.../......."....|
364 0000ce90 00 00 0d 2f 00 00 05 9c 00 00 07 d9 00 00 a3 40 |.../...........@|
365 0000cea0 00 00 0d 2f 00 00 05 68 00 00 07 94 00 00 a2 e4 |.../...h........|
366 0000ceb0 00 00 0d 2f 00 00 05 25 00 00 07 8d 00 00 a2 ce |.../...%........|
367 ...
368
369 See ``Documentation/iio/iio_devbuf.rst`` for more information about how buffered
370 data is structured.
371
372 4. IIO Interfacing Tools
373 ========================
374
375 See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
376 interfacing tools.
377

3. 한국어 전문 번역

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

장치 개요와 측정 기능

1-41

이 드라이버는 SPI 버스에 연결된 Analog Devices ADIS16550 IMU를 지원합니다.

ADIS16550 장치 구성
장치기본 센서파생 측정
ADIS165503축 gyroscope + 3축 accelerometerDelta angle + delta velocity

단일 지원 장치에 통합된 관성 센서와 파생 측정값입니다.

ADIS16550은 3축 자이로스코프와 3축 가속도계를 포함한 완전 관성 시스템입니다. 공장 보정은 각 센서의 감도, 바이어스, 정렬을 특성화하며, 각 센서의 동적 보상 공식이 정확한 측정값을 제공합니다.

가속도계와 자이로스코프 측정값은 항상 제공됩니다. 드라이버는 장치가 계산한 delta angle과 delta velocity도 읽을 수 있습니다.

Delta angle은 샘플 갱신 사이의 각변위를, delta velocity는 샘플 갱신 사이의 선형 속도 변화를 나타냅니다.

온도 데이터는 IMU 내부 온도의 대략적인 측정값이며, 열 환경의 상대 변화를 감시하는 데 가장 유용합니다.

각 IIO 장치에는 `/sys/bus/iio/devices/iio:deviceX` 폴더가 있습니다. X는 장치의 IIO 인덱스이며 하드웨어 특성에 따른 파일이 이 폴더 아래에 생성됩니다. 인터페이스의 일반 규칙은 IIO ABI 문서에 정의됩니다.

ADIS16550 측정 경로
3축 가속도·각속도 감지공장 감도·바이어스·정렬 보상 적용Delta angle·delta velocity 계산온도 측정 결합`iio:deviceX` 속성으로 노출

관성 입력부터 IIO 속성까지의 기본 흐름입니다.

.. SPDX-License-Identifier: GPL-2.0

================
ADIS16550 driver
================

This driver supports Analog Device's IMUs on SPI bus.

1. Supported devices
====================

* `ADIS16550 <https://www.analog.com/ADIS16550>`_

The ADIS16550 is a complete inertial system that includes a triaxis gyroscope
and a triaxis accelerometer. The factory calibration characterizes each sensor for
sensitivity, bias, and alignment. As a result, each sensor has its own dynamic
compensation formulas that provide accurate sensor measurements.

2. Device attributes
====================

Accelerometer, gyroscope measurements are always provided. Furthermore, the
driver offers the capability to retrieve the delta angle and the delta velocity
measurements computed by the device.

The delta angle measurements represent a calculation of angular displacement
between each sample update, while the delta velocity measurements represent a
calculation of linear velocity change between each sample update.

Finally, temperature data are provided which show a coarse measurement of
the temperature inside of the IMU device. This data is most useful for
monitoring relative changes in the thermal environment.

Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
where X is the IIO index of the device. Under these folders reside a set of
device files, depending on the characteristics and features of the hardware
device in questions. These files are consistently generalized and documented in
the IIO ABI documentation.

The following tables show the adis16550 related device files, found in the
specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.

센서 속성과 debugfs

42-145
3축 가속도계와 delta velocity 속성
장치 파일설명
`in_accel_scale`가속도계 채널 배율
`in_accel_filter_low_pass_3db_frequency`가속도계 채널 대역폭
`in_accel_x_calibbias`X축 가속도 보정 오프셋
`in_accel_x_calibscale`X축 가속도 보정 배율
`in_accel_x_raw`X축 가속도 원시 값
`in_accel_y_calibbias`Y축 가속도 보정 오프셋
`in_accel_y_calibscale`Y축 가속도 보정 배율
`in_accel_y_raw`Y축 가속도 원시 값
`in_accel_z_calibbias`Z축 가속도 보정 오프셋
`in_accel_z_calibscale`Z축 가속도 보정 배율
`in_accel_z_raw`Z축 가속도 원시 값
`in_deltavelocity_scale`Delta velocity 채널 배율
`in_deltavelocity_x_raw`X축 delta velocity 원시 값
`in_deltavelocity_y_raw`Y축 delta velocity 원시 값
`in_deltavelocity_z_raw`Z축 delta velocity 원시 값

가속도계는 공통 scale·filter와 축별 raw·calibbias·calibscale을 제공합니다.

3축 자이로스코프와 delta angle 속성
장치 파일설명
`in_anglvel_scale`자이로스코프 채널 배율
`in_anglvel_filter_low_pass_3db_frequency`자이로스코프 채널 대역폭
`in_anglvel_x_calibbias`X축 각속도 보정 오프셋
`in_anglvel_x_calibscale`X축 각속도 보정 배율
`in_anglvel_x_raw`X축 각속도 원시 값
`in_anglvel_y_calibbias`Y축 각속도 보정 오프셋
`in_anglvel_y_calibscale`Y축 각속도 보정 배율
`in_anglvel_y_raw`Y축 각속도 원시 값
`in_anglvel_z_calibbias`Z축 각속도 보정 오프셋
`in_anglvel_z_calibscale`Z축 각속도 보정 배율
`in_anglvel_z_raw`Z축 각속도 원시 값
`in_deltaangl_scale`Delta angle 채널 배율
`in_deltaangl_x_raw`X축 delta angle 원시 값
`in_deltaangl_y_raw`Y축 delta angle 원시 값
`in_deltaangl_z_raw`Z축 delta angle 원시 값

자이로스코프는 공통 scale·filter와 축별 raw·calibbias·calibscale을 제공합니다.

온도와 기타 장치 속성
장치 파일설명
`in_temp0_raw`온도 채널 원시 값
`in_temp0_offset`온도 센서 채널 오프셋
`in_temp0_scale`온도 센서 채널 배율
`name`IIO 장치 이름
`sampling_frequency`현재 선택한 sample rate

온도 처리값과 장치 식별·샘플 속도를 제공합니다.

ADIS16550 관련 디버그 파일은 `/sys/kernel/debug/iio/iio:deviceX`에서 찾을 수 있습니다.

ADIS16550 debugfs 파일
Debugfs 파일설명
`serial_number`16진수 형식의 칩 일련번호
`product_id`칩 제품 ID 16550
`flash_count`장치에서 수행한 flash write 횟수
`firmware_revision``##.##` 형식의 펌웨어 리비전
`firmware_date``mm-dd-yyyy` 형식의 펌웨어 날짜

칩 식별과 flash·firmware 상태를 읽는 진단 파일입니다.

ADIS16550 보정 계층
축별 raw 센서 값 취득축별 `calibbias` 오프셋 조정축별 `calibscale` 배율 조정가속도·각속도 공통 low-pass 대역폭 설정공통 scale로 물리 단위 변환

원시 축 데이터에 적용할 수 있는 사용자 설정을 정리합니다.


+-------------------------------------------+----------------------------------------------------------+
| 3-Axis Accelerometer related device files | Description                                              |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_scale                            | Scale for the accelerometer channels.                    |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_filter_low_pass_3db_frequency    | Bandwidth for the accelerometer channels.                |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_x_calibbias                      | Calibration offset for the X-axis accelerometer channel. |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_x_calibscale                     | Calibration scale for the X-axis accelerometer channel.  |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_x_raw                            | Raw X-axis accelerometer channel value.                  |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_y_calibbias                      | Calibration offset for the Y-axis accelerometer channel. |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_y_calibscale                     | Calibration scale for the Y-axis accelerometer channel.  |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_y_raw                            | Raw Y-axis accelerometer channel value.                  |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_z_calibbias                      | Calibration offset for the Z-axis accelerometer channel. |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_z_calibscale                     | Calibration scale for the Z-axis accelerometer channel.  |
+-------------------------------------------+----------------------------------------------------------+
| in_accel_z_raw                            | Raw Z-axis accelerometer channel value.                  |
+-------------------------------------------+----------------------------------------------------------+
| in_deltavelocity_scale                    | Scale for delta velocity channels.                       |
+-------------------------------------------+----------------------------------------------------------+
| in_deltavelocity_x_raw                    | Raw X-axis delta velocity channel value.                 |
+-------------------------------------------+----------------------------------------------------------+
| in_deltavelocity_y_raw                    | Raw Y-axis delta velocity channel value.                 |
+-------------------------------------------+----------------------------------------------------------+
| in_deltavelocity_z_raw                    | Raw Z-axis delta velocity channel value.                 |
+-------------------------------------------+----------------------------------------------------------+

+--------------------------------------------+------------------------------------------------------+
| 3-Axis Gyroscope related device files      | Description                                          |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_scale                           | Scale for the gyroscope channels.                    |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_filter_low_pass_3db_frequency   | Scale for the gyroscope channels.                    |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_x_calibbias                     | Calibration offset for the X-axis gyroscope channel. |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_x_calibscale                    | Calibration scale for the X-axis gyroscope channel.  |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_x_raw                           | Raw X-axis gyroscope channel value.                  |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_y_calibbias                     | Calibration offset for the Y-axis gyroscope channel. |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_y_calibscale                    | Calibration scale for the Y-axis gyroscope channel.  |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_y_raw                           | Raw Y-axis gyroscope channel value.                  |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_z_calibbias                     | Calibration offset for the Z-axis gyroscope channel. |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_z_calibscale                    | Calibration scale for the Z-axis gyroscope channel.  |
+--------------------------------------------+------------------------------------------------------+
| in_anglvel_z_raw                           | Raw Z-axis gyroscope channel value.                  |
+--------------------------------------------+------------------------------------------------------+
| in_deltaangl_scale                         | Scale for delta angle channels.                      |
+--------------------------------------------+------------------------------------------------------+
| in_deltaangl_x_raw                         | Raw X-axis delta angle channel value.                |
+--------------------------------------------+------------------------------------------------------+
| in_deltaangl_y_raw                         | Raw Y-axis delta angle channel value.                |
+--------------------------------------------+------------------------------------------------------+
| in_deltaangl_z_raw                         | Raw Z-axis delta angle channel value.                |
+--------------------------------------------+------------------------------------------------------+

+----------------------------------+-------------------------------------------+
| Temperature sensor related files | Description                               |
+----------------------------------+-------------------------------------------+
| in_temp0_raw                     | Raw temperature channel value.            |
+----------------------------------+-------------------------------------------+
| in_temp0_offset                  | Offset for the temperature sensor channel.|
+----------------------------------+-------------------------------------------+
| in_temp0_scale                   | Scale for the temperature sensor channel. |
+----------------------------------+-------------------------------------------+

+----------------------------+--------------------------------------------------------------------------------+
| Miscellaneous device files | Description                                                                    |
+----------------------------+--------------------------------------------------------------------------------+
| name                       | Name of the IIO device.                                                        |
+----------------------------+--------------------------------------------------------------------------------+
| sampling_frequency         | Currently selected sample rate.                                                |
+----------------------------+--------------------------------------------------------------------------------+

The following table shows the adis16550 related device debug files, found in the
specific device debug folder path ``/sys/kernel/debug/iio/iio:deviceX``.

+----------------------+-------------------------------------------------------------------------+
| Debugfs device files | Description                                                             |
+----------------------+-------------------------------------------------------------------------+
| serial_number        | The serial number of the chip in hexadecimal format.                    |
+----------------------+-------------------------------------------------------------------------+
| product_id           | Chip specific product id (16550).                                       |
+----------------------+-------------------------------------------------------------------------+
| flash_count          | The number of flash writes performed on the device.                     |
+----------------------+-------------------------------------------------------------------------+
| firmware_revision    | String containing the firmware revision in the following format ##.##.  |
+----------------------+-------------------------------------------------------------------------+
| firmware_date        | String containing the firmware date in the following format mm-dd-yyyy. |
+----------------------+-------------------------------------------------------------------------+

처리값 공식과 센서 예제

146-220

채널의 `_raw` 속성은 장치가 보고한 원시 값을 반환합니다. 처리된 채널 값은 다음 공식으로 계산합니다.

processed value = (_raw + _offset) * _scale

`_offset`과 `_scale`은 장치 속성입니다. `_offset` 속성이 없으면 값은 0으로 간주합니다.

처리된 채널 값의 측정 단위
채널 유형처리값 단위
X·Y·Z축 가속도m/s²
X·Y·Z축 각속도rad/s
X·Y·Z축 delta velocitym/s
X·Y·Z축 delta anglerad
온도밀리도 섭씨

ADIS16550이 제공하는 다섯 채널 유형의 IIO 표준 단위입니다.

장치 이름을 확인하는 예제는 `name`에서 `adis16550`을 읽습니다.

root:/sys/bus/iio/devices/iio:device0> cat name
adis16550

가속도계 예제는 X·Y·Z축 원시 값 6903851, 5650550, 104873530과 배율 0.000000095를 읽습니다.

root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
6903851
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
5650550
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
104873530
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
0.000000095
가속도 처리값 예제
원시 값처리값
X69038510.655865845 m/s²
Y56505500.53680225 m/s²
Z1048735309.96298535 m/s²

원시 값에 `in_accel_scale = 0.000000095`을 적용한 결과입니다.

자이로스코프 예제는 X·Y·Z축 원시 값 193309, −763676, −358108과 배율 0.000000003을 읽습니다.

root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_x_raw
193309
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_raw
-763676
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_z_raw
-358108
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_scale
0.000000003
각속도 처리값 예제
원시 값처리값
X1933090.000579927 rad/s
Y-763676−0.002291028 rad/s
Z-358108−0.001074324 rad/s

원시 값에 `in_anglvel_scale = 0.000000003`을 적용한 결과입니다.

센서 처리값 계산
축별 `_raw` 읽기해당 `_offset` 또는 calibbias 확인채널 공통 `_scale` 읽기`(_raw + _offset) * _scale` 계산m/s² 또는 rad/s 단위로 해석

원시 채널에서 물리 단위 결과를 얻는 절차입니다.

Channels processed values
-------------------------

A channel value can be read from its _raw attribute. The value returned is the
raw value as reported by the devices. To get the processed value of the channel,
apply the following formula:

.. code-block:: bash

        processed value = (_raw + _offset) * _scale

Where _offset and _scale are device attributes. If no _offset attribute is
present, simply assume its value is 0.

The adis16550 driver offers data for 5 types of channels, the table below shows
the measurement units for the processed value, which are defined by the IIO
framework:

+--------------------------------------+---------------------------+
| Channel type                         | Measurement unit          |
+--------------------------------------+---------------------------+
| Acceleration on X, Y, and Z axis     | Meters per Second squared |
+--------------------------------------+---------------------------+
| Angular velocity on X, Y and Z axis  | Radians per second        |
+--------------------------------------+---------------------------+
| Delta velocity on X. Y, and Z axis   | Meters per Second         |
+--------------------------------------+---------------------------+
| Delta angle on X, Y, and Z axis      | Radians                   |
+--------------------------------------+---------------------------+
| Temperature                          | Millidegrees Celsius      |
+--------------------------------------+---------------------------+

Usage examples
--------------

Show device name:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat name
        adis16550

Show accelerometer channels value:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
        6903851
        root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
        5650550
        root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
        104873530
        root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
        0.000000095

- X-axis acceleration = in_accel_x_raw * in_accel_scale = 0.655865845 m/s^2
- Y-axis acceleration = in_accel_y_raw * in_accel_scale = 0.53680225 m/s^2
- Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.96298535 m/s^2

Show gyroscope channels value:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_x_raw
        193309
        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_raw
        -763676
        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_z_raw
        -358108
        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_scale
        0.000000003

- X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = 0.000579927 rad/s
- Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = −0.002291028 rad/s
- Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = −0.001074324 rad/s

보정·샘플링·대역폭과 진단 예제

221-299

가속도계 X축 보정 오프셋은 처음 0이며 `in_accel_x_calibbias`에 5000을 쓰면 5000으로 변경됩니다.

root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
0
root:/sys/bus/iio/devices/iio:device0> echo 5000 > in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
5000

자이로스코프 Y축 보정 오프셋은 처음 0이며 `in_anglvel_y_calibbias`에 −5000을 쓰면 −5000으로 변경됩니다.

root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
0
root:/sys/bus/iio/devices/iio:device0> echo -5000 > in_anglvel_y_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
-5000

샘플링 주파수는 4000.000000에서 `sampling_frequency`에 1000을 써서 1000.000000으로 변경합니다.

root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
4000.000000
root:/sys/bus/iio/devices/iio:device0> echo 1000 > sampling_frequency
1000.000000

가속도계 공통 저역 통과 3 dB 대역폭은 `in_accel_filter_low_pass_3db_frequency`로 설정합니다. 예제에서는 0에서 100으로 변경합니다.

root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
0
root:/sys/bus/iio/devices/iio:device0> echo 100 > in_accel_filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
100

Debugfs 예제는 일련번호 `0x000000b6`, 제품 ID `16550`, flash write 횟수 `13`, 펌웨어 리비전 `1.5`, 펌웨어 날짜 `28-04-2021`을 읽습니다.

root:/sys/kernel/debug/iio/iio:device0> cat serial_number
0x000000b6
root:/sys/kernel/debug/iio/iio:device0> cat product_id
16550
root:/sys/kernel/debug/iio/iio:device0> cat flash_count
13
root:/sys/kernel/debug/iio/iio:device0> cat firmware_revision
1.5
root:/sys/kernel/debug/iio/iio:device0> cat firmware_date
28-04-2021
ADIS16550 설정·진단 예제
작업속성예제 값
가속도 X 보정`in_accel_x_calibbias`0 → 5000
각속도 Y 보정`in_anglvel_y_calibbias`0 → −5000
샘플 속도`sampling_frequency`4000 → 1000
가속도 대역폭`in_accel_filter_low_pass_3db_frequency`0 → 100
칩 식별`serial_number`, `product_id`0x000000b6, 16550
펌웨어`firmware_revision`, `firmware_date`1.5, 28-04-2021

원문에서 변경하거나 확인하는 값입니다.


Set calibration offset for accelerometer channels:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
        0

        root:/sys/bus/iio/devices/iio:device0> echo 5000 > in_accel_x_calibbias
        root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
        5000

Set calibration offset for gyroscope channels:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
        0

        root:/sys/bus/iio/devices/iio:device0> echo -5000 > in_anglvel_y_calibbias
        root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
        -5000

Set sampling frequency:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
        4000.000000

        root:/sys/bus/iio/devices/iio:device0> echo 1000 > sampling_frequency
        1000.000000

Set bandwidth for accelerometer channels:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
        0

        root:/sys/bus/iio/devices/iio:device0> echo 100 > in_accel_filter_low_pass_3db_frequency
        root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
        100

Show serial number:

.. code-block:: bash

        root:/sys/kernel/debug/iio/iio:device0> cat serial_number
        0x000000b6

Show product id:

.. code-block:: bash

        root:/sys/kernel/debug/iio/iio:device0> cat product_id
        16550

Show flash count:

.. code-block:: bash

        root:/sys/kernel/debug/iio/iio:device0> cat flash_count
        13

Show firmware revision:

.. code-block:: bash

        root:/sys/kernel/debug/iio/iio:device0> cat firmware_revision
        1.5

Show firmware date:

.. code-block:: bash

        root:/sys/kernel/debug/iio/iio:device0> cat firmware_date
        28-04-2021

IIO 버퍼와 인터페이스 도구

300-376

이 드라이버는 IIO 버퍼를 지원합니다. ADIS16550은 버퍼를 통해 원시 가속도, 자이로스코프, delta velocity, delta angle, 온도 측정값을 읽을 수 있습니다.

가속도 또는 자이로스코프 데이터를 버퍼로 읽을 때 delta 값은 사용할 수 없고 그 반대도 마찬가지입니다. 장치는 한 번에 일반 가속도·자이로스코프 또는 delta velocity·delta angle burst 중 하나만 읽을 수 있으며 두 모드 전환에 시간이 많이 듭니다.

ADIS16550 burst 선택 제약
Burst 모드포함 채널동시 사용 불가
일반 관성가속도 + 자이로스코프Delta velocity + delta angle
DeltaDelta velocity + delta angle가속도 + 자이로스코프

한 번의 버퍼 수집에서 선택 가능한 두 상호 배타적 데이터 그룹입니다.

버퍼 사용 전에 `trigger/current_trigger`가 비어 있으면 `adis16550-dev0`을 설정합니다.

root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
root:/sys/bus/iio/devices/iio:device0> echo adis16550-dev0 > trigger/current_trigger
root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
adis16550-dev0

X·Y·Z축 delta velocity와 온도 scan element를 활성화하고 버퍼 길이를 10으로 설정한 뒤 버퍼를 켭니다.

root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_x_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_y_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_z_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp0_en
root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable

버퍼 데이터는 `hexdump -C /dev/iio\:device0`로 확인합니다. 원문의 16진수 출력은 각 스캔 레코드의 원시 바이트를 주소별로 보여 줍니다.

root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
ADIS16550 delta 버퍼 캡처
`adis16550-dev0` 트리거 연결Delta velocity X·Y·Z와 온도 채널 선택`buffer/length = 10` 설정`buffer/enable = 1`로 수집 시작`hexdump -C`로 버퍼 확인

트리거 설정부터 원시 레코드 확인까지의 절차입니다.

버퍼 데이터 구조는 `Documentation/iio/iio_devbuf.rst`를 참고합니다. 사용 가능한 IIO 인터페이스 도구는 `Documentation/iio/iio_tools.rst`에 설명되어 있습니다.

3. Device buffers
=================

This driver supports IIO buffers.

The device supports retrieving the raw acceleration, gyroscope, delta velocity,
delta angle and temperature measurements using buffers.

However, when retrieving acceleration or gyroscope data using buffers, delta
readings will not be available and vice versa. This is because the device only
allows to read either acceleration and gyroscope data or delta velocity and
delta angle data at a time and switching between these two burst data selection
modes is time consuming.

Usage examples
--------------

Set device trigger in current_trigger, if not already set:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger

        root:/sys/bus/iio/devices/iio:device0> echo adis16550-dev0 > trigger/current_trigger
        root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
        adis16550-dev0

Select channels for buffer read:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_x_en
        root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_y_en
        root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_z_en
        root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp0_en

Set the number of samples to be stored in the buffer:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length

Enable buffer readings:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable

Obtain buffered data:

.. code-block:: bash

        root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
        ...
        0000cdf0  00 00 0d 2f 00 00 08 43  00 00 09 09 00 00 a4 5f  |.../...C......._|
        0000ce00  00 00 0d 2f 00 00 07 de  00 00 08 db 00 00 a4 4b  |.../...........K|
        0000ce10  00 00 0d 2f 00 00 07 58  00 00 08 a3 00 00 a4 55  |.../...X.......U|
        0000ce20  00 00 0d 2f 00 00 06 d6  00 00 08 5c 00 00 a4 62  |.../.......\...b|
        0000ce30  00 00 0d 2f 00 00 06 45  00 00 08 37 00 00 a4 47  |.../...E...7...G|
        0000ce40  00 00 0d 2f 00 00 05 d4  00 00 08 30 00 00 a3 fa  |.../.......0....|
        0000ce50  00 00 0d 2f 00 00 05 d0  00 00 08 12 00 00 a3 d3  |.../............|
        0000ce60  00 00 0d 2f 00 00 05 dd  00 00 08 2e 00 00 a3 e9  |.../............|
        0000ce70  00 00 0d 2f 00 00 05 cc  00 00 08 51 00 00 a3 d5  |.../.......Q....|
        0000ce80  00 00 0d 2f 00 00 05 ba  00 00 08 22 00 00 a3 9a  |.../......."....|
        0000ce90  00 00 0d 2f 00 00 05 9c  00 00 07 d9 00 00 a3 40  |.../...........@|
        0000cea0  00 00 0d 2f 00 00 05 68  00 00 07 94 00 00 a2 e4  |.../...h........|
        0000ceb0  00 00 0d 2f 00 00 05 25  00 00 07 8d 00 00 a2 ce  |.../...%........|
        ...

See ``Documentation/iio/iio_devbuf.rst`` for more information about how buffered
data is structured.

4. IIO Interfacing Tools
========================

See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
interfacing tools.