summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/sht3xtemp.4 3.html
blob: fc88d56fc6505a4d19231152ea6b3d5eaff36d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<table class="head">
  <tr>
    <td class="head-ltitle">SHT3XTEMP(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">SHT3XTEMP(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">sht3xtemp</code> &#x2014; <span class="Nd">Driver
    for Sensirion SHT30/SHT31/SHT35 sensor chip via I2C bus</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">sht3xtemp* at iic? addr 0x44</code>
  <br/>
  <code class="Cd">sht3xtemp* at iic? addr 0x45</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">sht3xtemp</code> driver provides measurements
    from the SHT30/SHT31/SHT35 humidity/temperature sensors via the
    <a class="Xr">envsys(4)</a> framework. The <code class="Nm">sht3xtemp</code>
    <var class="Ar">addr</var> locator selects the address at the
    <a class="Xr">iic(4)</a> bus. The mode of operation, repeatability, heater
    controls, periodic update rate and CRC validity can be changed through
    <a class="Xr">sysctl(8)</a> nodes.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL
  VARIABLES</a></h1>
<p class="Pp">The following <a class="Xr">sysctl(8)</a> variables are
  provided:</p>
<dl class="Bl-tag">
  <dt id="hw.sht3xtemp0.modes"><a class="permalink" href="#hw.sht3xtemp0.modes"><code class="Li">hw.sht3xtemp0.modes</code></a></dt>
  <dd>Lists the modes supported by the driver and chip.</dd>
  <dt id="hw.sht3xtemp0.mode"><a class="permalink" href="#hw.sht3xtemp0.mode"><code class="Li">hw.sht3xtemp0.mode</code></a></dt>
  <dd>Set the operation mode of the chip. The SHT3X chip can run in a
      single-shot measurement mode or a periodic update mode. Use one of the
      strings listed in <code class="Li">hw.sht3xtemp.modes</code>.</dd>
  <dt id="hw.sht3xtemp0.rates"><a class="permalink" href="#hw.sht3xtemp0.rates"><code class="Li">hw.sht3xtemp0.rates</code></a></dt>
  <dd>List the periodic update rates supported by the driver and chip.</dd>
  <dt id="hw.sht3xtemp0.rate"><a class="permalink" href="#hw.sht3xtemp0.rate"><code class="Li">hw.sht3xtemp0.rate</code></a></dt>
  <dd>Set the periodic update rate when the mode of operation is set to
      periodic. The unit for this is measurements per second, or ART which is a
      mode that operates at an update rate of 4Hz higher response time. Use one
      of the strings listed in <code class="Li">hw.sht3xtemp.rates</code>.
    <p class="Pp">Since it is possible to have subsecond periodic updates from
        the chip if so desired a device file is provided that can be used to get
        the raw temperature and humidity values outside of the
        <a class="Xr">envsys(4)</a> framework. The structure of this output is
        the raw temperature plus an 8-bit CRC followed by the raw humidity plus
        an 8-bit CRC.</p>
  </dd>
  <dt id="hw.sht3xtemp0.repeatabilities"><a class="permalink" href="#hw.sht3xtemp0.repeatabilities"><code class="Li">hw.sht3xtemp0.repeatabilities</code></a></dt>
  <dd>List the valid values for the repeatability used for a measurement.</dd>
  <dt id="hw.sht3xtemp0.repeatability"><a class="permalink" href="#hw.sht3xtemp0.repeatability"><code class="Li">hw.sht3xtemp0.repeatability</code></a></dt>
  <dd>Set the repeatability for the measurement. The higher the repeatability
      the longer the measurement will take and the more power used. Use one of
      the strings listed in
      <code class="Li">hw.sht3xtemp.repeatabilities</code>.</dd>
  <dt id="hw.sht3xtemp0.ignorecrc"><a class="permalink" href="#hw.sht3xtemp0.ignorecrc"><code class="Li">hw.sht3xtemp0.ignorecrc</code></a></dt>
  <dd>If set, the crc calculation for %RH and temperature in the measurement
      phrase will be ignored.</dd>
  <dt id="hw.sht3xtemp0.heateron"><a class="permalink" href="#hw.sht3xtemp0.heateron"><code class="Li">hw.sht3xtemp0.heateron</code></a></dt>
  <dd>Turn the heater on and off.</dd>
  <dt id="hw.sht3xtemp0.debug"><a class="permalink" href="#hw.sht3xtemp0.debug"><code class="Li">hw.sht3xtemp0.debug</code></a></dt>
  <dd>If the driver is compiled with <code class="Dv">SHT3X_DEBUG</code>, this
      node will appear and can be used to set the debugging level.</dd>
  <dt id="hw.sht3xtemp0.readattempts"><a class="permalink" href="#hw.sht3xtemp0.readattempts"><code class="Li">hw.sht3xtemp0.readattempts</code></a></dt>
  <dd>To read %RH or temperature the chip requires that the command be sent,
      then a delay must be observed before a read can be done to get the values
      back. The delays are documented in the datasheet for the chip. The driver
      will attempt to read back the values readattempts number of times. The
      default is 10 which should be more than enough for most purposes.</dd>
  <dt id="hw.sht3xtemp0.clockstretch"><a class="permalink" href="#hw.sht3xtemp0.clockstretch"><code class="Li">hw.sht3xtemp0.clockstretch</code></a></dt>
  <dd>The chip supports a set of commands that lets it use I2C clock stretching
      to perform the temperature or humidity measurement. If this is set to 1
      then use the clock stretching commands with the device. Note that the I2C
      controller must support clock stretching in order for this to work
      reliability. When this option is enabled, the readattempts sysctl noted
      above will not be used. This option only apply to single shot
      measurements.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
  <dt><span class="Pa">/dev/sht3xtemp</span><var class="Ar">u</var></dt>
  <dd>SHT3X device unit <var class="Ar">u</var> file.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">envsys(4)</a>, <a class="Xr">iic(4)</a>,
    <a class="Xr">envstat(8)</a>, <a class="Xr">sysctl(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">sht3xtemp</code> driver first appeared in
    <span class="Ux">NetBSD 10.0</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">sht3xtemp</code> driver was written by
    <span class="An">Brad Spencer</span>
    &lt;<a class="Mt" href="mailto:brad@anduin.eldar.org">brad@anduin.eldar.org</a>&gt;.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">The datasheet did not provide enough information to get the alarm
    function of the chip working.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">October 31, 2021</td>
    <td class="foot-os">NetBSD 10.1</td>
  </tr>
</table>