samples/shields/x_nucleo_iks02a1/sensorhub/README.html · samples/shields/x_nucleo_iks02a1/sensorhub/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Shields · Sensor Hub

X-NUCLEO-IKS02A1 Sensor Hub Mode 2

ISM330DHCX가 IIS2MDC magnetic field를 대신 읽어 motion dashboard에 합칩니다.

Official pathsamples/shields/x_nucleo_iks02a1/sensorhub/README.html
Source filesamples/shields/x_nucleo_iks02a1/sensorhub/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

IIS2DLPC direct path, ISM330DHCX hub path와 trigger output을 구분합니다.

Hub

ISM330DHCX

Slave

IIS2MDC

Mode

Sensor Hub 2

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 F56335BDD4DB1A72161A77AD567ED8C907952151ED9531F719EB6C45A4735272
.. zephyr:code-sample:: x-nucleo-iks02a1-shub
   :name: X-NUCLEO-IKS02A1 shield - SensorHub (Mode 2)
   :relevant-api: sensor_interface

   Interact with all the sensors of an X-NUCLEO-IKS02A1 shield using Sensor Hub mode.

Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS02A1 shield
configured in Sensor Hub mode (Mode 2).
Please refer to :ref:`x-nucleo-iks02a1` for more info on this configuration.

This sample enables IIS2DLPC and ISM330DHCX sensors. Since all other shield
devices are connected to ISM330DHCX, the ISM330DHCX driver is configured in sensorhub
mode (CONFIG_ISM330DHCX_SENSORHUB=y) with the IIS2MDC magnetometer as external
slave.

Then sensor data are displayed periodically

- IIS2DLPC 3-Axis acceleration
- ISM330DHCX 6-Axis acceleration and angular velocity
- ISM330DHCX (from IIS2MDC) 3-Axis magnetic field intensity


Requirements
************

This sample communicates over I2C with the X-NUCLEO-IKS02A1 shield
stacked on a board with an Arduino connector. The board's I2C must be
configured for the I2C Arduino connector (both for pin muxing
and devicetree). See for example the :ref:`nucleo_f401re_board` board
source code:

- :zephyr_file:`boards/st/nucleo_f401re/nucleo_f401re.dts`
- :zephyr_file:`boards/st/nucleo_f401re/pinmux.c`

Please note that this sample can't be used with boards already supporting
one of the sensors available on the shield (such as disco_l475_iot1)
as sensors multiple instances are not supported.

References
**********

- X-NUCLEO-IKS02A1: https://www.st.com/en/ecosystems/x-nucleo-iks02a1.html

Building and Running
********************

This sample runs with X-NUCLEO-IKS02A1 stacked on any board with a matching
Arduino connector. For this example, we use a :ref:`nucleo_f401re_board` board.

.. zephyr-app-commands::
   :zephyr-app: samples/shields/x_nucleo_iks02a1/sensorhub/
   :host-os: unix
   :board: nucleo_f401re
   :goals: build
   :compact:

Sample Output
=============

 .. code-block:: console


    X-NUCLEO-IKS02A1 sensor Mode 2 dashboard

    IIS2DLPC: Accel (m.s-2): x: 0.077, y: -0.766, z: 9.878
    ISM330DHCX: Accel (m.s-2): x: 0.383, y: -0.234, z: 9.763
    ISM330DHCX: GYro (dps): x: 0.004, y: 0.003, z: -0.005
    ISM330DHCX: Magn (gauss): x: 0.171, y: 0.225, z: -0.363
    7:: iis2dlpc trig 1215
    7:: ism330dhcx acc trig 2494
    7:: ism330dhcx gyr trig 2494

    <updated endlessly every 2 seconds>

Part 3

한국어 전문 번역

개요

X-NUCLEO-IKS02A1 shield를 Sensor Hub mode(Mode 2)로 구성해 시험하는 sample입니다. Mode 2 configuration은 shield 문서를 참조합니다.

IIS2DLPC와 ISM330DHCX를 활성화합니다. 다른 shield device가 모두 ISM330DHCX에 연결되므로 driver를 CONFIG_ISM330DHCX_SENSORHUB=y로 구성하고 IIS2MDC magnetometer를 external slave로 둡니다.

  • IIS2DLPC 자체의 3-axis acceleration
  • ISM330DHCX 자체의 6-axis acceleration과 angular velocity
  • IIS2MDC에서 ISM330DHCX sensor hub를 거쳐 읽는 3-axis magnetic field intensity

요구 사항

Arduino connector가 있는 board 위 shield와 I2C로 통신하며, Arduino I2C용 pin muxing과 devicetree를 모두 구성해야 합니다. 공식 예제 source path는 boards/st/nucleo_f401re/nucleo_f401re.dts와 boards/st/nucleo_f401re/pinmux.c입니다.

Sensor multiple instance가 지원되지 않으므로 disco_l475_iot1처럼 동일 sensor를 이미 지원하는 board에서는 사용할 수 없습니다.

참고 자료

빌드 및 실행

Matching Arduino connector가 있는 board에서 실행할 수 있으며, Unix host의 nucleo_f401re build 예는 다음과 같습니다.

west build -b nucleo_f401re samples/shields/x_nucleo_iks02a1/sensorhub/

출력 예

X-NUCLEO-IKS02A1 sensor Mode 2 dashboard

IIS2DLPC: Accel (m.s-2): x: 0.077, y: -0.766, z: 9.878
ISM330DHCX: Accel (m.s-2): x: 0.383, y: -0.234, z: 9.763
ISM330DHCX: GYro (dps): x: 0.004, y: 0.003, z: -0.005
ISM330DHCX: Magn (gauss): x: 0.171, y: 0.225, z: -0.363
7:: iis2dlpc trig 1215
7:: ism330dhcx acc trig 2494
7:: ism330dhcx gyr trig 2494

<updated endlessly every 2 seconds>

Mode 2 dashboard에는 IIS2DLPC acceleration, ISM330DHCX acceleration·gyroscope, IIS2MDC에서 전달된 magnetic field와 각 trigger count가 표시되며 2초마다 갱신됩니다. 원문의 GYro 대소문자는 그대로 보존했습니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.