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:
parent
2477de86f0
commit
cc70daacdf
3 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2022 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&stm0 {
|
||||
prescaler = <1>;
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2022 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&stm0 {
|
||||
prescaler = <1>;
|
||||
status = "okay";
|
||||
};
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue