Skip to content

Commit 06bbdd4

Browse files
billwatersiiicfriedt
authored andcommitted
samples: drivers: counter: alarm: add psc3m5
Enable the alarm sample for the kit_psc3m5_evk Signed-off-by: Bill Waters <[email protected]>
1 parent c159206 commit 06bbdd4

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2025 Infineon Technologies AG,
3+
* or an affiliate of Infineon Technologies AG.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <zephyr/dt-bindings/pwm/pwm_ifx_tcpwm.h>
9+
10+
&tcpwm0_0 {
11+
status = "okay";
12+
divider-type = <PWM_IFX_SYSCLK_DIV_16_BIT>;
13+
divider-sel = <0>;
14+
divider-val = <2399>;
15+
16+
counter0_0 {
17+
status = "okay";
18+
clocks = <&peri0_group4_16bit_0>;
19+
clock-frequency = <20000>;
20+
};
21+
};
22+
23+
&peri0_group4_16bit_0 {
24+
status = "okay";
25+
scb-block = <0>;
26+
div-value = <109>;
27+
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct counter_alarm_cfg alarm_cfg;
4949
#define TIMER DT_NODELABEL(rtcc0)
5050
#elif defined(CONFIG_COUNTER_GECKO_STIMER)
5151
#define TIMER DT_NODELABEL(stimer0)
52-
#elif defined(CONFIG_COUNTER_INFINEON_CAT1)
52+
#elif defined(CONFIG_COUNTER_INFINEON_CAT1) || defined(CONFIG_COUNTER_INFINEON_TCPWM)
5353
#define TIMER DT_NODELABEL(counter0_0)
5454
#elif defined(CONFIG_COUNTER_AMBIQ)
5555
#ifdef TIMER

0 commit comments

Comments
 (0)