Skip to content

Commit cc3040a

Browse files
aviscontifabiobaltieri
authored andcommitted
boards/shields: add support for x-nucleo-iks4a1 shield
x-nucleo-iks4a1 shield is an arduino compatible companion board which can be used on top of Nucleo standard boards for industrial applications. Following MEMS sensor are currently supported: - LSM6DSO16IS: MEMS 3D accelerometer + 3D gyroscope - LSM6DSV16X: MEMS 3D accelerometer + 3D gyroscope - LIS2MDL: MEMS 3D magnetometer - LPS22DF: Low-power and high-precision MEMS pressure sensor (https://www.st.com/resource/en/data_brief/x-nucleo-iks4a1.pdf) The board exports three overlays: 1. x_nucleo_iks4a1.overlay (standard mode) All MEMS sensors are connected to micro-controller. 2. x_nucleo_iks4a1_shub1.overlay (HUB1 mode) LSM6DSV16X IMU sensor act as a sensor_hub with LIS2MDL and LPS22DF connected to it. 3. x_nucleo_iks4a1_shub2.overlay (HUB2 mode) LSM6DSO16IS IMU sensor act as a sensor_hub with LIS2MDL and LPS22DF connected to it. Signed-off-by: Armando Visconti <[email protected]>
1 parent ed0ccbb commit cc3040a

File tree

6 files changed

+252
-0
lines changed

6 files changed

+252
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_X_NUCLEO_IKS01A4
5+
def_bool $(shields_list_contains,x_nucleo_iks4a1)
Loading
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
.. _x-nucleo-iks4a1:
2+
3+
X-NUCLEO-IKS4A1: MEMS Inertial and Environmental Multi sensor shield
4+
####################################################################
5+
6+
Overview
7+
********
8+
The X-NUCLEO-IKS4A1 is a motion MEMS and environmental sensor expansion board
9+
for the STM32 Nucleo. It is equipped with Arduino UNO R3 connector layout, and
10+
allows application development with features like sensor HUB (LSM6DSO16IS and
11+
LSM6DSV16X), camera module integration and Qvar touch/swipe gestures (thanks to
12+
the equipped electrode).
13+
14+
.. image:: img/x-nucleo-iks4a1.jpg
15+
:align: center
16+
:alt: X-NUCLEO-IKS4A1
17+
18+
More general information about the board can be found at the
19+
`X-NUCLEO-IKS4A1 website`_.
20+
21+
Hardware Description
22+
********************
23+
24+
X-NUCLEO-IKS4A1 provides the following key features:
25+
26+
- LSM6DSO16IS: MEMS 3D accelerometer (±2/±4/±8/±16 g) + 3D gyroscope
27+
(±125/±250/±500/±1000/±2000 dps) with ISPU (Intelligent Processing Unit)
28+
- LIS2MDL: MEMS 3D magnetometer (±50 gauss)
29+
- LIS2DUXS12: Ultra low-power MEMS 3D accelerometer (±2/±4/±8/±16 g) with
30+
Qvar, AI, & anti-aliasing
31+
- LPS22DF: Low-power and high-precision MEMS pressure sensor, 260-1260 hPa
32+
absolute digital output barometer
33+
- SHT40AD1B: High-accuracy, ultra-low-power relative humidity and temperature
34+
sensor (by Sensirion)
35+
- STTS22H: Low-voltage, ultralow-power, 0.5 °C accuracy temperature sensor
36+
(–40 °C to +125 °C)
37+
- LSM6DSV16X: MEMS 3D accelerometer (±2/±4/±8/±16 g) + 3D gyroscope
38+
(±125/±250/±500/±1000/±2000/±4000 dps) with embedded sensor fusion, AI, Qvar
39+
- DIL 24-pin socket available for additional MEMS adapters and other sensors
40+
- Free comprehensive development firmware library and example for all sensors
41+
compatible with STM32Cube firmware
42+
- Equipped with Qvar touch/swipe electrode
43+
- I²C sensor hub features on LSM6DSO and LSM6DSV16X available
44+
- MIPI I3C® compatibility for communication with LIS2DUXS12, LSM6DSV16X and
45+
LPS22DF
46+
- Compatible with STM32 Nucleo boards
47+
- Equipped with Arduino UNO R3 connector
48+
- Equipped with industrial connector for IR sensor (STHS34PF80) application
49+
development. It can be connected at the same time of external MEMS through
50+
DIL24 adapter
51+
- Available interface for external camera module applications coupled with
52+
LSM6DSV16X through aux SPI (3/4 w)
53+
- RoHS compliant
54+
- WEEE compliant
55+
- UKCA compliant
56+
57+
Hardware Configuration
58+
**********************
59+
60+
X-NUCLEO-IKS4A1 board can be configured in five different modes, which can be
61+
selected through J4 and J5 jumpers. Additional information about X-NUCLEO-IKS4A1
62+
configuration modes and how sensors are connected together can be found in the
63+
`X-NUCLEO-IKS4A1 user manual`_
64+
65+
.. _x-nucleo-iks4a1-mode-1:
66+
67+
Mode 1: Standard Mode
68+
=====================
69+
70+
In standard I2C mode, all devices are connected to an external main board via the
71+
same I2C bus.
72+
73+
The board configuration is:
74+
75+
- J4: 1-2, 11-12 (STM_SDA = SENS_SDA, HUB_SDx = GND)
76+
- J5: 1-2, 11-12 (STM_SCL = SENS_SCL, HUB_SCx = GND)
77+
78+
.. _x-nucleo-iks4a1-mode-2:
79+
80+
Mode 2: LSM6DSO16IS SensorHub Mode (SHUB2)
81+
==========================================
82+
83+
In this sensor hub I2C mode, it is possible to power-up the 6-axes IMU
84+
(Inertial Measurement Unit) functionalities by collecting external data
85+
through a direct control of the on-board environmental sensors (temperature,
86+
pressure and magnetometer) and external sensor (DIL24) through the auxiliary
87+
I2Cz bus "SENS_I2C". LSM6DSV16X, LIS2DUXS12 and SHT40AD1B remains connected
88+
to the main bus "uC_I2C" coming from the external board.
89+
90+
The board configuration is:
91+
92+
- J4: 7-8 (HUB2_SDx = SENS_SDA)
93+
- J5: 7-8 (HUB2_SCx = SENS_SCL)
94+
95+
.. _x-nucleo-iks4a1-mode-3:
96+
97+
Mode 3: LSM6DSV16X SensorHub Mode (SHUB1)
98+
=========================================
99+
100+
In this sensor hub, it is possible to power-up the 6-axes IMU (Inertial
101+
Measurement Unit) functionalities by collecting external data through
102+
a direct control of the on-board environmental sensors (temperature,
103+
pressure and magnetometer) and external sensor (DIL24) through the auxiliary
104+
I2C bus "SENS_I2C". LSM6DSO16IS, LIS2DUXS12 and SHT40AD1B remains connected
105+
to the main bus "uC_I2C" coming from the external board.
106+
107+
The board configuration is:
108+
109+
- J4: 5-6 (HUB1_SDx = SENS_SDA)
110+
- J5: 5-6 (HUB1_SDx = SENS_SDA)
111+
112+
Mode 4: DIL24 SensorHub Mode
113+
============================
114+
115+
In case a sensor with sensor hub embedded functionality is mounted to the
116+
board through DIL24 adapter, it is possible to exploit this functionality
117+
as for LSM6DSO16IS and the LSM6DSV16X. In this configuration, may be necessary
118+
to connect the DIL24 to the external board through SPI lines in order to
119+
avoid an address conflict on I2C bus with the LSM6DSO16IS and the LSM6DSV16X.
120+
This is done by changing the SBx configuration.
121+
122+
The board configuration is:
123+
124+
- J4: 9-10 (DIL_SDx = SENS_SDA)
125+
- J5: 9-10 (DIL_SDx = SENS_SDA)
126+
127+
Mode 5: LSM6DSO16IS as Qvar controller
128+
======================================
129+
130+
In this configuration, it is possible to use the equipped Qvar swipe electrode
131+
(by plugging it on JP6 and JP7 connectors) through the LSM6DSO16IS.
132+
133+
The board configuration is:
134+
135+
- J4: 3-4 (HUB1_SDx = QVAR1)
136+
- J5: 3-4 (HUB1_Scx = QVAR2)
137+
138+
Devicetree Overlays
139+
*******************
140+
141+
There are three predefined DT overlays in the board:
142+
143+
- :zephyr_file:`boards/shields/x_nucleo_iks4a1/x_nucleo_iks4a1.overlay`
144+
This overlay describes sensor connections (and matching h/w configuration to be done)
145+
as explained in Standard Mode (:ref:`x-nucleo-iks4a1-mode-1`)
146+
- :zephyr_file:`boards/shields/x_nucleo_iks4a1/x_nucleo_iks4a1_shub1.overlay`
147+
This overlay describes sensor connections (and matching h/w configuration to be done)
148+
as explained in SHUB1 Mode (:ref:`x-nucleo-iks4a1-mode-3`)
149+
- :zephyr_file:`boards/shields/x_nucleo_iks4a1/x_nucleo_iks4a1_shub2.overlay`
150+
This overlay describes sensor connections (and matching h/w configuration to be done)
151+
as explained in SHUB2 Mode (:ref:`x-nucleo-iks4a1-mode-2`)
152+
153+
.. _X-NUCLEO-IKS4A1 website:
154+
http://www.st.com/en/ecosystems/x-nucleo-iks4a1.html
155+
156+
.. _X-NUCLEO-IKS4A1 user manual:
157+
https://www.st.com/resource/en/user_manual/um3239-getting-started-with-the-xnucleoiks4a1-motion-mems-and-environmental-sensor-expansion-board-for-stm32-nucleo-stmicroelectronics.pdf
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
magn0 = &lis2mdl_1e_x_nucleo_iks4a1;
10+
accel0 = &lsm6dso16is_6a_x_nucleo_iks4a1;
11+
accel1 = &lsm6dsv16x_6b_x_nucleo_iks4a1;
12+
press0 = &lps22df_5d_x_nucleo_iks4a1;
13+
};
14+
};
15+
16+
&arduino_i2c {
17+
lsm6dso16is_6a_x_nucleo_iks4a1: lsm6dso16is@6a {
18+
compatible = "st,lsm6dso16is";
19+
reg = <0x6a>;
20+
accel-odr = <0x1b>;
21+
gyro-odr = <0x11>;
22+
irq-gpios = <&arduino_header 5 GPIO_ACTIVE_HIGH>; /* A5 (PC0) */
23+
drdy-pin = <1>;
24+
};
25+
26+
lsm6dsv16x_6b_x_nucleo_iks4a1: lsm6dsv16x@6b {
27+
compatible = "st,lsm6dsv16x";
28+
reg = <0x6b>;
29+
accel-odr = <0x02>;
30+
gyro-odr = <0x02>;
31+
int2-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 (PB5) */
32+
drdy-pin = <2>;
33+
drdy-pulsed;
34+
};
35+
36+
lis2mdl_1e_x_nucleo_iks4a1: lis2mdl@1e {
37+
compatible = "st,lis2mdl";
38+
reg = <0x1e>;
39+
irq-gpios = <&arduino_header 2 GPIO_ACTIVE_HIGH>; /* A2 (PA4) */
40+
};
41+
42+
lps22df_5d_x_nucleo_iks4a1: lps22df@5d {
43+
compatible = "st,lps22df";
44+
reg = <0x5d>;
45+
drdy-pulsed;
46+
drdy-gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; /* D6 (PB10) */
47+
};
48+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
accel0 = &lsm6dsv16x_6b_x_nucleo_iks4a1;
10+
};
11+
};
12+
13+
&arduino_i2c {
14+
lsm6dsv16x_6b_x_nucleo_iks4a1: lsm6dsv16x@6b {
15+
compatible = "st,lsm6dsv16x";
16+
reg = <0x6b>;
17+
accel-odr = <0x02>;
18+
gyro-odr = <0x02>;
19+
int1-gpios = <&arduino_header 11 GPIO_ACTIVE_HIGH>; /* D5 */
20+
drdy-pin = <1>;
21+
};
22+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
accel0 = &lsm6dso16is_6a_x_nucleo_iks4a1_shub;
10+
};
11+
};
12+
13+
&arduino_i2c {
14+
lsm6dso16is_6a_x_nucleo_iks4a1_shub: lsm6dso16is@6a {
15+
compatible = "st,lsm6dso16is";
16+
reg = <0x6a>;
17+
irq-gpios = <&arduino_header 5 GPIO_ACTIVE_HIGH>; /* A5 */
18+
drdy-pin = <1>;
19+
};
20+
};

0 commit comments

Comments
 (0)