← Documents Documentation/hwmon/max31827.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Kernel driver max31827

MAX31827 계열의 경보 상태 전이, 변환 주기·해상도, 원샷과 PEC 설정을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

max31827.rst:1-144

비교기·인터럽트 경보를 안전하게 재설정하고 8-12비트 변환과 PEC 통신 비용을 관리합니다.

문서 개요
항목
SourceDocumentation/hwmon/max31827.rst
분량144 source lines
I2C 주소0x40-0x5f
기본 해상도12비트

원문 분량과 핵심 인터페이스입니다.

운영 흐름
모델 기본값 통일경보 모드 설정변환 주기·해상도 선택원샷 읽기PEC·타임아웃 관리

장치 등록부터 측정·경보 처리까지의 순서입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Kernel driver max31827
4 ======================
5
6 Supported chips:
7
8 * Maxim MAX31827
9
10 Prefix: 'max31827'
11
12 Addresses scanned: I2C 0x40 - 0x5f
13
14 Datasheet: Publicly available at the Analog Devices website
15
16 * Maxim MAX31828
17
18 Prefix: 'max31828'
19
20 Addresses scanned: I2C 0x40 - 0x5f
21
22 Datasheet: Publicly available at the Analog Devices website
23
24 * Maxim MAX31829
25
26 Prefix: 'max31829'
27
28 Addresses scanned: I2C 0x40 - 0x5f
29
30 Datasheet: Publicly available at the Analog Devices website
31
32
33 Authors:
34 - Daniel Matyas <daniel.matyas@analog.com>
35
36 Description
37 -----------
38
39 The chips supported by this driver are quite similar. The only difference
40 between them is found in the default power-on behaviour of the chips. While the
41 MAX31827's fault queue is set to 1, the other two chip's fault queue is set to
42 4. Besides this, the MAX31829's alarm active state is high, while the other two
43 chip's alarms are active on low. It is important to note that the chips can be
44 configured to operate in the same manner with 1 write operation to the
45 configuration register. From here on, we will refer to all these chips as
46 MAX31827.
47
48 MAX31827 implements a temperature sensor with a 6 WLP packaging scheme. This
49 sensor measures the temperature of the chip itself.
50
51 MAX31827 has low and over temperature alarms with an effective value and a
52 hysteresis value: -40 and -30 degrees for under temperature alarm and +100 and
53 +90 degrees for over temperature alarm.
54
55 The alarm can be configured in comparator and interrupt mode from the
56 devicetree. In Comparator mode, the OT/UT status bits have a value of 1 when the
57 temperature rises above the TH value or falls below TL, which is also subject to
58 the Fault Queue selection. OT status returns to 0 when the temperature drops
59 below the TH_HYST value or when shutdown mode is entered. Similarly, UT status
60 returns to 0 when the temperature rises above TL_HYST value or when shutdown
61 mode is entered.
62
63 In interrupt mode exceeding TH also sets OT status to 1, which remains set until
64 a read operation is performed on the configuration/status register (max or min
65 attribute); at this point, it returns to 0. Once OT status is set to 1 from
66 exceeding TH and reset, it is set to 1 again only when the temperature drops
67 below TH_HYST. The output remains asserted until it is reset by a read. It is
68 set again if the temperature rises above TH, and so on. The same logic applies
69 to the operation of the UT status bit.
70
71 Putting the MAX31827 into shutdown mode also resets the OT/UT status bits. Note
72 that if the mode is changed while OT/UT status bits are set, an OT/UT status
73 reset may be required before it begins to behave normally. To prevent this,
74 it is recommended to perform a read of the configuration/status register to
75 clear the status bits before changing the operating mode.
76
77 The conversions can be manual with the one-shot functionality and automatic with
78 a set frequency. When powered on, the chip measures temperatures with 1 conv/s.
79 The conversion rate can be modified with update_interval attribute of the chip.
80 Conversion/second = 1/update_interval. Thus, the available options according to
81 the data sheet are:
82
83 - 64000 (ms) = 1 conv/64 sec
84 - 32000 (ms) = 1 conv/32 sec
85 - 16000 (ms) = 1 conv/16 sec
86 - 4000 (ms) = 1 conv/4 sec
87 - 1000 (ms) = 1 conv/sec (default)
88 - 250 (ms) = 4 conv/sec
89 - 125 (ms) = 8 conv/sec
90
91 Enabling the device when it is already enabled has the side effect of setting
92 the conversion frequency to 1 conv/s. The conversion time varies depending on
93 the resolution.
94
95 The conversion time doubles with every bit of increased resolution. The
96 available resolutions are:
97
98 - 8 bit -> 8.75 ms conversion time
99 - 9 bit -> 17.5 ms conversion time
100 - 10 bit -> 35 ms conversion time
101 - 12 bit (default) -> 140 ms conversion time
102
103 There is a temp1_resolution attribute which indicates the unit change in the
104 input temperature in milli-degrees C.
105
106 - 1000 mC -> 8 bit
107 - 500 mC -> 9 bit
108 - 250 mC -> 10 bit
109 - 62 mC -> 12 bit (default) - actually this is 62.5, but the fil returns 62
110
111 When chip is in shutdown mode and a read operation is requested, one-shot is
112 triggered, the device waits for <conversion time> ms, and only after that is
113 the temperature value register read. Note that the conversion times are rounded
114 up to the nearest possible integer.
115
116 The LSB of the temperature values is 0.0625 degrees Celsius, but the values of
117 the temperatures are displayed in milli-degrees. This means, that some data is
118 lost. The step between 2 consecutive values is 62 or 63. This effect can be seen
119 in the writing of alarm values too. For positive numbers the user-input value
120 will always be rounded down to the nearest possible value, for negative numbers
121 the user-input will always be rounded up to the nearest possible value.
122
123 Bus timeout resets the I2C-compatible interface when SCL is low for more than
124 30ms (nominal).
125
126 Alarm polarity determines if the active state of the alarm is low or high. The
127 behavior for both settings is dependent on the Fault Queue setting. The ALARM
128 pin is an open-drain output and requires a pullup resistor to operate.
129
130 The Fault Queue bits select how many consecutive temperature faults must occur
131 before overtemperature or undertemperature faults are indicated in the
132 corresponding status bits.
133
134 PEC Support
135 -----------
136
137 When reading a register value, the PEC byte is computed and sent by the chip.
138
139 PEC on word data transaction represents a significant increase in bandwidth
140 usage (+33% for both write and reads) in normal conditions.
141
142 Since this operation implies there will be an extra delay to each
143 transaction, PEC can be disabled or enabled through sysfs.
144 Just write 1 to the "pec" file for enabling PEC and 0 for disabling it.
145

3. 한국어 전문 번역

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

MAX31827/MAX31828/MAX31829 기본 동작 차이

1-47

GPL-2.0 문서의 이 드라이버는 Maxim MAX31827, MAX31828, MAX31829를 각각 같은 이름의 접두사로 지원합니다. 세 모델 모두 I2C `0x40-0x5f`를 검색하며 저자는 Daniel Matyas입니다.

모델의 차이는 전원 인가 기본값입니다. MAX31827의 Fault Queue는 1이고 MAX31828·MAX31829는 4입니다. MAX31829 경보는 active-high이고 나머지 두 모델은 active-low입니다. 구성 레지스터에 한 번 쓰면 세 모델을 같은 방식으로 동작시킬 수 있으므로 이후 설명은 모두 MAX31827로 부릅니다.

MAX31827은 6 WLP 패키지의 칩 자체 온도 센서입니다. 저온 경보의 유효값과 히스테리시스 기본값은 -40°C와 -30°C, 과온 경보는 +100°C와 +90°C입니다.

MAX31827 계열 기본값
모델Fault Queue경보 활성 상태
MAX318271low
MAX318284low
MAX318294high

전원 인가 시 Fault Queue와 경보 극성이 다릅니다.

동작 통일
I2C 모델 식별전원 인가 기본값 확인Fault Queue 설정경보 극성 설정공통 MAX31827 동작 적용

구성 레지스터 기록으로 모델별 기본 차이를 없앨 수 있습니다.

.. SPDX-License-Identifier: GPL-2.0

Kernel driver max31827
======================

Supported chips:

  * Maxim MAX31827

    Prefix: 'max31827'

    Addresses scanned: I2C 0x40 - 0x5f

    Datasheet: Publicly available at the Analog Devices website

  * Maxim MAX31828

    Prefix: 'max31828'

    Addresses scanned: I2C 0x40 - 0x5f

    Datasheet: Publicly available at the Analog Devices website

  * Maxim MAX31829

    Prefix: 'max31829'

    Addresses scanned: I2C 0x40 - 0x5f

    Datasheet: Publicly available at the Analog Devices website


Authors:
        - Daniel Matyas <daniel.matyas@analog.com>

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

The chips supported by this driver are quite similar. The only difference
between them is found in the default power-on behaviour of the chips. While the
MAX31827's fault queue is set to 1, the other two chip's fault queue is set to
4. Besides this, the MAX31829's alarm active state is high, while the other two
chip's alarms are active on low. It is important to note that the chips can be
configured to operate in the same manner with 1 write operation to the
configuration register. From here on, we will refer to all these chips as
MAX31827.

비교기·인터럽트 모드의 OT/UT 상태 전이

48-79

경보는 devicetree에서 비교기 또는 인터럽트 모드로 구성합니다. 비교기 모드에서 온도가 `TH`보다 높거나 `TL`보다 낮으면 Fault Queue 조건을 거쳐 `OT` 또는 `UT` 상태가 1이 됩니다.

비교기 모드의 `OT`는 온도가 `TH_HYST` 아래로 내려가거나 shutdown 모드에 들어가면 0으로 돌아옵니다. `UT`는 온도가 `TL_HYST` 위로 오르거나 shutdown에 들어가면 0이 됩니다.

인터럽트 모드에서 TH 초과로 설정된 OT는 구성/상태 레지스터, 즉 max 또는 min 속성을 읽을 때까지 유지되고 읽으면 0이 됩니다. 이후 온도가 TH_HYST 아래로 내려가야 다음 TH 초과에서 다시 설정될 수 있습니다. 출력은 읽기로 재설정될 때까지 유지되며 UT도 같은 논리로 동작합니다.

shutdown 진입도 OT/UT를 재설정합니다. 상태 비트가 설정된 채 모드를 바꾸면 정상 동작 전에 별도 재설정이 필요할 수 있으므로, 모드 변경 전에 구성/상태 레지스터를 읽어 비트를 지우는 것이 권장됩니다.

MAX31827 경보 모드
모드설정 조건해제 조건
비교기 OTT > TH + Fault QueueT < TH_HYST 또는 shutdown
비교기 UTT < TL + Fault QueueT > TL_HYST 또는 shutdown
인터럽트 OT/UT임계값 초과·미달상태 레지스터 읽기 또는 shutdown

상태 비트의 해제 조건이 핵심 차이입니다.

안전한 모드 변경
현재 OT/UT 상태 확인구성/상태 레지스터 읽기상태 비트 해제 확인비교기/인터럽트 모드 변경새 경보 동작 확인

남은 상태 비트가 새 모드에 영향을 주지 않게 합니다.

MAX31827 implements a temperature sensor with a 6 WLP packaging scheme. This
sensor measures the temperature of the chip itself.

MAX31827 has low and over temperature alarms with an effective value and a
hysteresis value: -40 and -30 degrees for under temperature alarm and +100 and
+90 degrees for over temperature alarm.

The alarm can be configured in comparator and interrupt mode from the
devicetree. In Comparator mode, the OT/UT status bits have a value of 1 when the
temperature rises above the TH value or falls below TL, which is also subject to
the Fault Queue selection. OT status returns to 0 when the temperature drops
below the TH_HYST value or when shutdown mode is entered. Similarly, UT status
returns to 0 when the temperature rises above TL_HYST value or when shutdown
mode is entered.

In interrupt mode exceeding TH also sets OT status to 1, which remains set until
a read operation is performed on the configuration/status register (max or min
attribute); at this point, it returns to 0. Once OT status is set to 1 from
exceeding TH and reset, it is set to 1 again only when the temperature drops
below TH_HYST. The output remains asserted until it is reset by a read. It is
set again if the temperature rises above TH, and so on. The same logic applies
to the operation of the UT status bit.

Putting the MAX31827 into shutdown mode also resets the OT/UT status bits. Note
that if the mode is changed while OT/UT status bits are set, an OT/UT status
reset may be required before it begins to behave normally. To prevent this,
it is recommended to perform a read of the configuration/status register to
clear the status bits before changing the operating mode.

The conversions can be manual with the one-shot functionality and automatic with
a set frequency. When powered on, the chip measures temperatures with 1 conv/s.
The conversion rate can be modified with update_interval attribute of the chip.

변환 주기·해상도·원샷과 값 반올림

80-123

변환은 원샷 수동 방식 또는 지정 주기의 자동 방식입니다. 전원 인가 기본값은 초당 1회이며 `update_interval`로 바꿉니다. 초당 변환 수는 `1/update_interval`입니다.

지원 간격은 64000ms(64초당 1회), 32000ms, 16000ms, 4000ms, 1000ms(기본 초당 1회), 250ms(초당 4회), 125ms(초당 8회)입니다. 이미 활성화된 장치를 다시 활성화하면 변환 주기가 초당 1회로 돌아가는 부작용이 있습니다.

해상도가 1비트 늘 때마다 변환 시간은 두 배가 됩니다. 8비트는 8.75ms, 9비트는 17.5ms, 10비트는 35ms, 기본 12비트는 140ms입니다. `temp1_resolution`은 밀리섭씨 단위 변화량을 표시하며 8·9·10·12비트에 각각 1000, 500, 250, 62mC입니다. 실제 12비트 단계는 62.5mC지만 파일은 62를 반환합니다.

shutdown 상태에서 읽기를 요청하면 원샷 변환을 시작하고 정수로 올림한 변환 시간만큼 기다린 뒤 온도 레지스터를 읽습니다. 온도 LSB는 0.0625°C이지만 표시 단위가 m°C라 일부 정밀도가 사라져 연속 값 차이가 62 또는 63이 됩니다. 경보값 쓰기에서도 양수는 가능한 값으로 내림, 음수는 올림됩니다.

MAX31827 변환 해상도
해상도변환 시간temp1_resolution
8비트8.75ms1000mC
9비트17.5ms500mC
10비트35ms250mC
12비트140ms62mC(실제 62.5mC)

해상도와 변환 시간·표시 단계의 관계입니다.

shutdown 원샷 읽기
shutdown 상태에서 온도 읽기 요청원샷 변환 트리거해상도별 변환 시간 대기온도 레지스터 읽기m°C 단위로 반올림해 반환

읽기 요청이 변환과 대기를 자동으로 수행합니다.

Conversion/second = 1/update_interval. Thus, the available options according to
the data sheet are:

- 64000 (ms) = 1 conv/64 sec
- 32000 (ms) = 1 conv/32 sec
- 16000 (ms) = 1 conv/16 sec
- 4000 (ms) = 1 conv/4 sec
- 1000 (ms) = 1 conv/sec (default)
- 250 (ms) = 4 conv/sec
- 125 (ms) = 8 conv/sec

Enabling the device when it is already enabled has the side effect of setting
the conversion frequency to 1 conv/s. The conversion time varies depending on
the resolution.

The conversion time doubles with every bit of increased resolution. The
available resolutions are:

- 8 bit -> 8.75 ms conversion time
- 9 bit -> 17.5 ms conversion time
- 10 bit -> 35 ms conversion time
- 12 bit (default) -> 140 ms conversion time

There is a temp1_resolution attribute which indicates the unit change in the
input temperature in milli-degrees C.

- 1000 mC -> 8 bit
- 500 mC -> 9 bit
- 250 mC -> 10 bit
- 62 mC -> 12 bit (default) - actually this is 62.5, but the fil returns 62

When chip is in shutdown mode and a read operation is requested, one-shot is
triggered, the device waits for <conversion time> ms, and only after that is
the temperature value register read. Note that the conversion times are rounded
up to the nearest possible integer.

The LSB of the temperature values is 0.0625 degrees Celsius, but the values of
the temperatures are displayed in milli-degrees. This means, that some data is
lost. The step between 2 consecutive values is 62 or 63. This effect can be seen
in the writing of alarm values too. For positive numbers the user-input value
will always be rounded down to the nearest possible value, for negative numbers
the user-input will always be rounded up to the nearest possible value.

Bus timeout resets the I2C-compatible interface when SCL is low for more than

버스 타임아웃·경보 극성·Fault Queue·PEC

124-144

SCL이 명목상 30ms보다 오래 low이면 버스 타임아웃이 I2C 호환 인터페이스를 재설정합니다.

경보 극성은 활성 상태가 low인지 high인지 정하고 두 설정 모두 Fault Queue 값의 영향을 받습니다. `ALARM` 핀은 오픈 드레인 출력이므로 동작하려면 풀업 저항이 필요합니다. Fault Queue 비트는 과온·저온 상태를 보고하기 전에 연속으로 발생해야 하는 온도 고장 횟수를 선택합니다.

레지스터를 읽을 때 칩이 PEC 바이트를 계산해 전송합니다. 워드 데이터에서 PEC는 정상 조건의 읽기와 쓰기 모두 대역폭을 33% 늘리고 각 트랜잭션에 지연을 추가합니다. sysfs `pec` 파일에 1을 쓰면 활성화하고 0을 쓰면 비활성화합니다.

MAX31827 통신 보호
기능동작
버스 타임아웃SCL low가 30ms 초과 시 인터페이스 재설정
ALARM 출력오픈 드레인, 풀업 필요
Fault Queue연속 고장 횟수 선택
PEC워드 거래 대역폭 +33%, sysfs 1/0

버스 복구와 무결성 검사 기능입니다.

PEC 사용 결정
버스 오류 위험 평가추가 33% 대역폭 고려pec 파일에 1 또는 0 기록레지스터 거래 수행타임아웃·PEC 오류 감시

무결성과 지연·대역폭 비용을 비교합니다.

30ms (nominal).

Alarm polarity determines if the active state of the alarm is low or high. The
behavior for both settings is dependent on the Fault Queue setting. The ALARM
pin is an open-drain output and requires a pullup resistor to operate.

The Fault Queue bits select how many consecutive temperature faults must occur
before overtemperature or undertemperature faults are indicated in the
corresponding status bits.

PEC Support
-----------

When reading a register value, the PEC byte is computed and sent by the chip.

PEC on word data transaction represents a significant increase in bandwidth
usage (+33% for both write and reads) in normal conditions.

Since this operation implies there will be an extra delay to each
transaction, PEC can be disabled or enabled through sysfs.
Just write 1  to the "pec" file for enabling PEC and 0 for disabling it.