File tree Expand file tree Collapse file tree 7 files changed +51
-1
lines changed
boards/silabs/radio_boards/siwx917_rb4338a
modules/hal_silabs/wiseconnect
soc/silabs/silabs_siwx91x Expand file tree Collapse file tree 7 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 107107 };
108108};
109109
110+ &sysrtc0 {
111+ status = "okay";
112+ };
113+
110114&bt_hci0 {
111115 status = "okay";
112116};
Original file line number Diff line number Diff line change 33
44config SILABS_SLEEPTIMER_TIMER
55 bool "Silabs Sleeptimer system clock driver"
6- depends on SOC_FAMILY_SILABS_S2
6+ depends on SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X
77 depends on DT_HAS_SILABS_GECKO_STIMER_ENABLED
88 select SOC_SILABS_SLEEPTIMER
99 select TICKLESS_CAPABLE
Original file line number Diff line number Diff line change 66
77#include <arm/armv7-m.dtsi>
88#include <zephyr/dt-bindings/clock/silabs/siwx91x-clock.h>
9+ #include <freq.h>
910
1011/ {
1112 chosen {
285286 clocks = <&clock0 SIWX91X_CLK_WATCHDOG>;
286287 status = "disabled";
287288 };
289+
290+ sysrtc0: sysrtc@24048c00 {
291+ compatible = "silabs,gecko-stimer";
292+ reg = <0x24048c00 0x78>;
293+ interrupts = <22 0>;
294+ interrupt-names = "sysrtc";
295+ clock-frequency = <DT_FREQ_K(32)>;
296+ prescaler = <1>;
297+ status = "disabled";
298+ };
288299 };
289300};
290301
Original file line number Diff line number Diff line change @@ -151,5 +151,23 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
151151 )
152152endif () # CONFIG_WISECONNECT_NETWORK_STACK
153153
154+ if (CONFIG_SOC_SILABS_SLEEPTIMER)
155+ zephyr_include_directories(
156+ ${SISDK_DIR} /platform/service/sleeptimer/inc
157+ ${SISDK_DIR} /platform/service/sleeptimer/src
158+ ${SISDK_DIR} /platform/service/sleeptimer/config
159+ )
160+
161+ zephyr_library_sources(
162+ ${SISDK_DIR} /platform/service/sleeptimer/src/sl_sleeptimer.c
163+ ${WISECONNECT_DIR} /components/device/silabs/si91x/mcu/drivers/service/sleeptimer/src/sl_sleeptimer_hal_si91x_sysrtc.c
164+ )
165+ zephyr_compile_definitions(
166+ SL_CATALOG_SLEEPTIMER_PRESENT
167+ SL_CODE_COMPONENT_SLEEPTIMER=sleeptimer
168+ SL_CODE_COMPONENT_HAL_SYSRTC=hal_sysrtc
169+ )
170+ endif () # CONFIG_SOC_SILABS_SLEEPTIMER
171+
154172zephyr_linker_sources(ROM_SECTIONS linker/code_classification_text.ld)
155173zephyr_linker_sources(RAMFUNC_SECTION linker/code_classification_ramfunc.ld)
Original file line number Diff line number Diff line change @@ -9,3 +9,8 @@ config SOC_FAMILY_SILABS_SIWX91X
99 select CPU_HAS_ARM_MPU
1010 select HAS_SILABS_WISECONNECT
1111 select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
12+
13+ config SOC_SILABS_SLEEPTIMER
14+ bool
15+ help
16+ The Sleeptimer HAL module is used for SIWX91X.
Original file line number Diff line number Diff line change 33
44if SOC_FAMILY_SILABS_SIWX91X
55
6+ configdefault SILABS_SLEEPTIMER_TIMER
7+ default y
8+
9+ configdefault CORTEX_M_SYSTICK
10+ default n if SILABS_SLEEPTIMER_TIMER
11+
12+ configdefault SYS_CLOCK_TICKS_PER_SEC
13+ default 128 if !TICKLESS_KERNEL && SILABS_SLEEPTIMER_TIMER
14+ default 1024 if SILABS_SLEEPTIMER_TIMER
15+
616config WISECONNECT_NETWORK_STACK
717 bool
818 select CMSIS_RTOS_V2
Original file line number Diff line number Diff line change 77
88#include "si91x_device.h"
99
10+ #define SYSRTC_IRQHandler IRQ022_Handler
11+
1012#endif
You can’t perform that action at this time.
0 commit comments