Skip to content

Commit 2c5c0e2

Browse files
ssekar15danieldegrasse
authored andcommitted
samples: drivers: counter: Add support alarm for lp_mspm0g3507
Add a support for timer/counter alarm sample for lp_mspmg3507 board. Signed-off-by: Saravanan Sekar <[email protected]>
1 parent 3fe1eda commit 2c5c0e2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2025 Linumiz GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
counter = &counter0;
10+
};
11+
};
12+
13+
&gpt0 {
14+
status = "okay";
15+
counter0: counter {
16+
status = "okay";
17+
};
18+
};

samples/drivers/counter/alarm/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ struct counter_alarm_cfg alarm_cfg;
3939
#define TIMER DT_INST(0, espressif_esp32_counter)
4040
#elif defined(CONFIG_COUNTER_MCUX_CTIMER)
4141
#define TIMER DT_NODELABEL(ctimer0)
42+
#elif defined(CONFIG_COUNTER_MSPM0_TIMER)
43+
#define TIMER DT_ALIAS(counter)
4244
#elif defined(CONFIG_COUNTER_NXP_S32_SYS_TIMER)
4345
#define TIMER DT_NODELABEL(stm0)
4446
#elif defined(CONFIG_COUNTER_TIMER_GD32)

0 commit comments

Comments
 (0)