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 <saravanan@linumiz.com>
This commit is contained in:
Saravanan Sekar 2025-05-20 17:53:23 +05:30 committed by Daniel DeGrasse
commit 2c5c0e24e8
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2025 Linumiz GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
counter = &counter0;
};
};
&gpt0 {
status = "okay";
counter0: counter {
status = "okay";
};
};

View file

@ -39,6 +39,8 @@ struct counter_alarm_cfg alarm_cfg;
#define TIMER DT_INST(0, espressif_esp32_counter)
#elif defined(CONFIG_COUNTER_MCUX_CTIMER)
#define TIMER DT_NODELABEL(ctimer0)
#elif defined(CONFIG_COUNTER_MSPM0_TIMER)
#define TIMER DT_ALIAS(counter)
#elif defined(CONFIG_COUNTER_NXP_S32_SYS_TIMER)
#define TIMER DT_NODELABEL(stm0)
#elif defined(CONFIG_COUNTER_TIMER_GD32)