Skip to content

Commit 9c8d932

Browse files
ZhaoxiangJincfriedt
authored andcommitted
samples: enable rt700 die_temp_polling sample
1. The updated regex better matches device names for various temperature sensors. If a device name contains hyphens, the new regex can match it. 2. enable rt700 die_temp_polling sample Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent ed66a1b commit 9c8d932

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/adc/adc.h>
8+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
9+
10+
&pmc_tmpsns {
11+
status = "okay";
12+
io-channels = <&lpadc0 0>;
13+
};
14+
15+
&lpadc0 {
16+
#address-cells = <1>;
17+
#size-cells = <0>;
18+
19+
channel@0 {
20+
reg = <0>;
21+
zephyr,gain = "ADC_GAIN_1";
22+
zephyr,reference = "ADC_REF_EXTERNAL0";
23+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 131)>;
24+
zephyr,input-positive = <MCUX_LPADC_CH6A>;
25+
zephyr,input-negative = <MCUX_LPADC_CH6B>;
26+
zephyr,differential;
27+
};
28+
};

samples/sensor/die_temp_polling/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ tests:
1313
harness_config:
1414
type: one_line
1515
regex:
16-
- "CPU Die temperature\\[[A-Za-z0-9_@]+\\]: [1-9][0-9].[0-9] °C"
16+
- "CPU Die temperature\\[[\\-A-Za-z0-9_@]+\\]: [1-9][0-9].[0-9] °C"

0 commit comments

Comments
 (0)