samples: counter: support System Timer on s32z270dc2_r52

Enable counter alarm sample on s32z270dc2_r52 boards, using the first
System Timer Module instance.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
This commit is contained in:
Manuel Arguelles 2022-10-06 17:47:07 +07:00 committed by Carles Cufí
commit cc70daacdf
3 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,10 @@
/*
* Copyright 2022 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
&stm0 {
prescaler = <1>;
status = "okay";
};

View file

@ -0,0 +1,10 @@
/*
* Copyright 2022 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
&stm0 {
prescaler = <1>;
status = "okay";
};

View file

@ -33,6 +33,8 @@ struct counter_alarm_cfg alarm_cfg;
#define TIMER DT_NODELABEL(timer0)
#elif defined(CONFIG_COUNTER_MCUX_CTIMER)
#define TIMER DT_NODELABEL(ctimer0)
#elif defined(CONFIG_COUNTER_NXP_S32_SYS_TIMER)
#define TIMER DT_NODELABEL(stm0)
#endif
static void test_counter_interrupt_fn(const struct device *counter_dev,