Part 1
요약·해설
Link·network·개별 slave layer 경계와 64-bit ROM identification을 다룹니다.
15.4 kbps · 100 m/10 nodes
125 kbps · 10 m/3 nodes
64-bit · family code · CRC
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
E2F38510158B5D6E929D40F70280D0BDE7ACB38A58E8CB293DFCBC7CD32F5CA3
.. _w1_api:
1-Wire Bus
##########
Overview
********
1-Wire is a low speed half-duplex serial bus using only a single wire plus
ground for both data transmission and device power supply.
Similarly to I2C, 1-Wire uses a bidirectional open-collector data line,
and is a single master multidrop bus. This means one master initiates all data
exchanges with the slave devices.
The 1-Wire bus supports longer bus lines than I2C, while it reaches speeds of up
to 15.4 kbps in standard mode and up to 125 kbps in overdrive mode.
Reliable communication in standard speed configuration is possible with 10 nodes
over a bus length of 100 meters. Using overdrive speed, 3 nodes on a bus of
10 meters length are expected to work solid. Optimized timing parameters and
fewer nodes on the bus may allow to reach larger bus extents.
The implementation details are specified in the `BOOK OF IBUTTON STANDARDS`_.
.. figure:: ../../../../hardware/peripherals/1-Wire_bus_topology.drawio.svg
:align: center
:alt: 1-Wire bus topology
A typical 1-Wire bus topology
.. _w1-master-api:
W1 Master API
=================
Zephyr's 1-Wire Master API is used to interact with 1-Wire slave devices like
temperature sensors and serial memories.
In Zephyr this API is split into the following layers.
* The link layer handles basic communication functions such as bus reset,
presence detect and bit transfer operations.
It is the only hardware-dependent layer in Zephyr.
This layer is supported by a driver using the Zephyr :ref:`uart_api` interface,
which should work on most Zephyr platforms.
In the future, a GPIO/Timer based driver and hardware specific drivers might
be added.
* The 1-Wire network layer handles all means for slave identification and bus
arbitration.
This includes ROM commands like Match ROM, or Search ROM.
* All slave devices have a unique 64-bit identification number, which
includes a 8-bit `1-Wire Family Code`_ and a 8-bit CRC.
* In order to find slaves on the bus, the standard specifies an search
algorithm which successively detects all slaves on the bus.
This algorithm is described in detail by `Maxim's Applicationnote 187`_.
* Transport layer and Presentation layer functions are not implemented in the
generic 1-Wire driver and therefore must be handled in individual slave drivers.
The 1-Wire API is considered experimental.
Configuration Options
*********************
Related configuration options:
* :kconfig:option:`CONFIG_W1`
* :kconfig:option:`CONFIG_W1_NET`
API Reference
*************
1-Wire data link layer
======================
.. doxygengroup:: w1_data_link
1-Wire network layer
====================
.. doxygengroup:: w1_network
1-Wire generic functions and helpers
====================================
Functions that are not directly related to any of the networking layers.
.. doxygengroup:: w1_interface
.. _BOOK OF IBUTTON STANDARDS:
https://www.maximintegrated.com/en/design/technical-documents/app-notes/9/937.html
.. _1-Wire Family Code:
https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/155.html
.. _Maxim's Applicationnote 187:
https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/187.html
Part 3
한국어 전문 번역
Overview
1-Wire는 data transmission과 device power supply에 ground와 단일 wire만 사용하는 low-speed half-duplex serial bus입니다.
I2C와 마찬가지로 bidirectional open-collector data line을 사용하며 single-master multidrop bus입니다. 즉 하나의 master가 slave device와의 모든 data exchange를 시작합니다.
1-Wire bus는 I2C보다 긴 bus line을 지원합니다. Standard mode는 최대 15.4 kbps, overdrive mode는 최대 125 kbps에 도달합니다.
Standard-speed configuration에서는 길이 100 m bus에 node 10개가 있어도 reliable communication이 가능합니다. Overdrive speed에서는 길이 10 m bus의 node 3개가 안정적으로 동작할 것으로 예상됩니다. Timing parameter를 최적화하고 bus node 수를 줄이면 더 긴 범위에 도달할 수 있습니다.
구현 세부 사항은 BOOK OF IBUTTON STANDARDS에 규정돼 있습니다.
W1 Master API
Zephyr 1-Wire Master API는 temperature sensor와 serial memory 같은 1-Wire slave device와 상호 작용할 때 사용합니다.
Zephyr의 이 API는 다음 layer로 나뉩니다.
- Link layer: Bus reset, presence detect, bit-transfer operation 같은 기본 communication function을 처리합니다. Zephyr에서 hardware-dependent한 유일한 layer입니다. Zephyr UART interface를 사용하는 driver가 이 layer를 지원하므로 대부분의 Zephyr platform에서 동작해야 합니다. 향후 GPIO/Timer 기반 driver와 hardware-specific driver가 추가될 수 있습니다.
- 1-Wire network layer: Slave identification과 bus arbitration의 모든 수단을 처리합니다. Match ROM, Search ROM 같은 ROM command가 포함됩니다.
- 모든 slave device는 8-bit 1-Wire Family Code와 8-bit CRC를 포함한 고유 64-bit identification number를 가집니다.
- Bus의 slave를 찾기 위해 standard는 모든 slave를 차례로 검출하는 search algorithm을 정의합니다. 자세한 내용은 Maxim Application Note 187에 설명돼 있습니다.
- Transport layer와 Presentation layer: Generic 1-Wire driver에는 구현되지 않으므로 개별 slave driver가 처리해야 합니다.
1-Wire API는 experimental로 간주됩니다.
Configuration Options
관련 configuration option은 CONFIG_W1과 CONFIG_W1_NET입니다.
API Reference
1-Wire data link layer
w1_data_link Doxygen group이 data-link layer의 공식 API reference를 제공합니다.
1-Wire network layer
w1_network Doxygen group이 network layer의 공식 API reference를 제공합니다.
1-Wire generic functions and helpers
Networking layer와 직접 관련되지 않은 function은 w1_interface Doxygen group이 제공합니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.