Skip to content

Commit adac777

Browse files
committed
samples: zephyr: sensor: accel_polling and bme680 at LM20 DK
LM20 DK. Signed-off-by: Piotr Kosycarz <[email protected]>
1 parent 0e0e4ea commit adac777

File tree

4 files changed

+108
-0
lines changed

4 files changed

+108
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/ {
2+
aliases {
3+
accel0 = &adxl362;
4+
accel-gyro = &bmi270;
5+
};
6+
};
7+
8+
&pinctrl {
9+
spi21_default: spi21_default {
10+
group1 {
11+
psels = <NRF_PSEL(SPIM_SCK, 1, 18)>,
12+
<NRF_PSEL(SPIM_MISO, 1, 30)>,
13+
<NRF_PSEL(SPIM_MOSI, 1, 31)>;
14+
};
15+
};
16+
17+
spi21_sleep: spi21_sleep {
18+
group1 {
19+
psels = <NRF_PSEL(SPIM_SCK, 1, 18)>,
20+
<NRF_PSEL(SPIM_MISO, 1, 30)>,
21+
<NRF_PSEL(SPIM_MOSI, 1, 31)>;
22+
low-power-enable;
23+
};
24+
};
25+
};
26+
27+
&spi21 {
28+
status = "okay";
29+
pinctrl-0 = <&spi21_default>;
30+
pinctrl-1 = <&spi21_sleep>;
31+
pinctrl-names = "default", "sleep";
32+
cs-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>,
33+
<&gpio1 16 GPIO_ACTIVE_LOW>;
34+
35+
bmi270: bmi270@0 {
36+
compatible = "bosch,bmi270";
37+
status = "okay";
38+
reg = <0>;
39+
spi-max-frequency = <DT_FREQ_M(8)>;
40+
};
41+
42+
adxl362: adxl362@1 {
43+
compatible = "adi,adxl362";
44+
status = "okay";
45+
reg = <1>;
46+
int1-gpios = <&gpio1 15 (GPIO_ACTIVE_HIGH)>;
47+
spi-max-frequency = <DT_FREQ_M(8)>;
48+
};
49+
};

samples/zephyr/sensor/accel_polling/sample.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,16 @@ tests:
9494
- CONFIG_LOG=y
9595
- CONFIG_SENSOR_LOG_LEVEL_DBG=y
9696
platform_allow: nrf54l15dk/nrf54l15/cpuflpr
97+
98+
nrf.extended.sample.sensor.accel_polling.nrf54lm20:
99+
harness_config:
100+
fixture: pca63565
101+
type: one_line
102+
regex:
103+
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m/s\\^2\\]: \\(\\s*-?[0-9\\.]*,\\\
104+
s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
105+
extra_configs:
106+
- CONFIG_LOG=y
107+
- CONFIG_SENSOR_LOG_LEVEL_DBG=y
108+
platform_allow:
109+
- [email protected]/nrf54lm20a/cpuapp
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/ {
2+
aliases {
3+
sensor-bme688 = &i2c22;
4+
};
5+
};
6+
7+
&pinctrl {
8+
i2c22_default: i2c22_default {
9+
group1 {
10+
psels = <NRF_PSEL(TWIM_SCL, 1, 18)>,
11+
<NRF_PSEL(TWIM_SDA, 1, 16)>;
12+
};
13+
};
14+
15+
i2c22_sleep: i2c22_sleep {
16+
group1 {
17+
psels = <NRF_PSEL(TWIM_SCL, 1, 18)>,
18+
<NRF_PSEL(TWIM_SDA, 1, 16)>;
19+
low-power-enable;
20+
};
21+
};
22+
};
23+
24+
&i2c22 {
25+
status = "okay";
26+
zephyr,concat-buf-size = <512>;
27+
pinctrl-0 = <&i2c22_default>;
28+
pinctrl-1 = <&i2c22_sleep>;
29+
pinctrl-names = "default", "sleep";
30+
31+
bme688: bme688@76 {
32+
compatible = "bosch,bme680";
33+
status = "okay";
34+
reg = <0x76>;
35+
};
36+
};

samples/zephyr/sensor/bme680/sample.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,13 @@ tests:
8585
- SHIELD=pca63565
8686
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
8787
platform_allow: nrf54l15dk/nrf54l15/cpuflpr
88+
89+
nrf.extended.sample.sensor.bme680.nrf54lm20:
90+
harness_config:
91+
fixture: pca63565
92+
type: one_line
93+
regex:
94+
- "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\\
95+
.]*$"
96+
platform_allow:
97+
- [email protected]/nrf54lm20a/cpuapp

0 commit comments

Comments
 (0)