← Documents Documentation/w1/slaves/w1_ds2423.rst GitHub 원문 ↗

Linux 6.18.37 · 1-Wire / Slave

Kernel driver w1_ds2423

DS2423 페이지 12~15의 RAM·카운터와 CRC 출력 형식을 설명합니다.

Source pathDocumentation/w1/slaves/w1_ds2423.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

w1_ds2423.rst:1-54

DS2423 페이지 12~15의 RAM·카운터와 CRC 출력 형식을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Kernel driver w1_ds2423
2 =======================
3
4 Supported chips:
5
6 * Maxim DS2423 based counter devices.
7
8 supported family codes:
9
10 =============== ====
11 W1_THERM_DS2423 0x1D
12 =============== ====
13
14 Author: Mika Laitio <lamikr@pilppa.org>
15
16 Description
17 -----------
18
19 Support is provided through the sysfs w1_slave file. Each opening and
20 read sequence of w1_slave file initiates the read of counters and ram
21 available in DS2423 pages 12 - 15.
22
23 Result of each page is provided as an ASCII output where each counter
24 value and associated ram buffer is outpputed to own line.
25
26 Each lines will contain the values of 42 bytes read from the counter and
27 memory page along the crc=YES or NO for indicating whether the read operation
28 was successful and CRC matched.
29 If the operation was successful, there is also in the end of each line
30 a counter value expressed as an integer after c=
31
32 Meaning of 42 bytes represented is following:
33
34 - 1 byte from ram page
35 - 4 bytes for the counter value
36 - 4 zero bytes
37 - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
38 - 31 remaining bytes from the ram page
39 - crc=YES/NO indicating whether read was ok and crc matched
40 - c=<int> current counter value
41
42 example from the successful read::
43
44 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
45 00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
46 00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
47 00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5
48
49 example from the read with crc errors::
50
51 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
52 00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
53 00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
54 00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO
55

3. 한국어 전문 번역

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

지원 장치와 읽기 범위

1-18

`w1_ds2423`은 Maxim DS2423 기반 카운터 장치를 지원합니다. family symbol은 원문 표의 `W1_THERM_DS2423`, 코드는 `0x1D`이며 작성자는 Mika Laitio입니다.

지원 인터페이스는 sysfs의 `w1_slave`입니다. 파일을 열어 읽을 때마다 DS2423의 12~15 페이지에 있는 카운터와 RAM을 읽습니다.

DS2423 읽기 범위
항목
Family symbolW1_THERM_DS2423
Family code0x1D
페이지12~15
인터페이스w1_slave

한 번의 w1_slave 읽기가 가져오는 대상입니다.

Kernel driver w1_ds2423
=======================

Supported chips:

  * Maxim DS2423 based counter devices.

supported family codes:

        ===============        ====
        W1_THERM_DS2423        0x1D
        ===============        ====

Author: Mika Laitio <lamikr@pilppa.org>

Description
-----------

42바이트 출력 형식

19-38

각 페이지 결과는 ASCII 한 줄로 출력됩니다. 카운터 값과 연관 RAM 버퍼가 페이지별로 한 줄씩 나타납니다.

각 줄에는 카운터·메모리 페이지에서 읽은 42바이트와 `crc=YES` 또는 `crc=NO`가 포함됩니다. 읽기와 CRC가 모두 성공한 경우 끝에 정수 카운터 값 `c=<int>`도 붙습니다.

42바이트는 RAM 페이지의 첫 1바이트, 4바이트 카운터, 4개의 0 바이트, 앞선 CRC 이후 데이터로 계산한 CRC16 2바이트, RAM 페이지의 나머지 31바이트 순서입니다.

DS2423 한 줄의 구성
길이/필드내용
1 byteRAM 페이지의 첫 바이트
4 bytes카운터 값
4 bytes0
2 bytesCRC16
31 bytesRAM 페이지의 나머지
crc=YES/NO읽기와 CRC 성공 여부
c=<int>성공한 경우의 현재 카운터

42바이트와 상태 필드의 순서입니다.

Support is provided through the sysfs w1_slave file. Each opening and
read sequence of w1_slave file initiates the read of counters and ram
available in DS2423 pages 12 - 15.

Result of each page is provided as an ASCII output where each counter
value and associated ram buffer is outpputed to own line.

Each lines will contain the values of 42 bytes read from the counter and
memory page along the crc=YES or NO for indicating whether the read operation
was successful and CRC matched.
If the operation was successful, there is also in the end of each line
a counter value expressed as an integer after c=

Meaning of 42 bytes represented is following:

 - 1 byte from ram page
 - 4 bytes for the counter value
 - 4 zero bytes
 - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
 - 31 remaining bytes from the ram page

정상 및 CRC 오류 예시

39-54

정상 예시에서는 네 페이지 모두 `crc=YES`이며 각 줄 끝에 `c=2`, `c=408798761`, `c=5` 같은 카운터 값이 표시됩니다.

CRC 오류 예시에서는 정상인 첫 줄만 카운터가 표시되고, 손상된 줄은 `crc=NO`로 끝나며 `c=` 필드가 없습니다. 원문의 모든 42바이트 예시는 아래 영어 원문 블록에 그대로 보존됩니다.

DS2423 페이지 판독
페이지 12~15에서 각각 42바이트 읽기페이지 데이터의 CRC16 계산일치하면 crc=YES와 c=<int> 출력불일치하면 crc=NO만 출력

페이지별 CRC 결과에 따라 카운터 필드가 달라집니다.

 - crc=YES/NO indicating whether read was ok and crc matched
 - c=<int> current counter value

example from the successful read::

  00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
  00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
  00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
  00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5

example from the read with crc errors::

  00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
  00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
  00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
  00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO