File tree 9 files changed +69
-2
lines changed
boards/silabs/radio_boards/siwx917_rb4338a
modules/hal_silabs/wiseconnect
9 files changed +69
-2
lines changed Original file line number Diff line number Diff line change 107
107
};
108
108
};
109
109
110
+ &sysrtc0 {
111
+ status = "okay";
112
+ };
113
+
110
114
&bt_hci0 {
111
115
status = "okay";
112
116
};
Original file line number Diff line number Diff line change 3
3
4
4
config SILABS_SLEEPTIMER_TIMER
5
5
bool "Silabs Sleeptimer system clock driver"
6
- depends on SOC_FAMILY_SILABS_S2
6
+ depends on SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X
7
7
depends on DT_HAS_SILABS_GECKO_STIMER_ENABLED
8
8
select SOC_SILABS_SLEEPTIMER
9
9
select TICKLESS_CAPABLE
Original file line number Diff line number Diff line change 6
6
7
7
#include <arm/armv7-m.dtsi>
8
8
#include <zephyr/dt-bindings/clock/silabs/siwx91x-clock.h>
9
+ #include <freq.h>
9
10
10
11
/ {
11
12
chosen {
285
286
clocks = <&clock0 SIWX91X_CLK_WATCHDOG>;
286
287
status = "disabled";
287
288
};
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
+ };
288
299
};
289
300
};
290
301
Original file line number Diff line number Diff line change @@ -151,5 +151,36 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
151
151
)
152
152
endif () # CONFIG_WISECONNECT_NETWORK_STACK
153
153
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_code_relocate(FILES
166
+ ${SISDK_DIR} /platform/service/sleeptimer/src/sl_sleeptimer.c
167
+ ${WISECONNECT_DIR} /components/device/silabs/si91x/mcu/drivers/service/sleeptimer/src/sl_sleeptimer_hal_si91x_sysrtc.c
168
+ ${WISECONNECT_DIR} /components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_sysrtc.c
169
+ LOCATION RAM
170
+ FILTER ".*"
171
+ )
172
+ zephyr_compile_definitions(
173
+ SL_CATALOG_SLEEPTIMER_PRESENT
174
+ SL_CODE_COMPONENT_SLEEPTIMER=sleeptimer
175
+ SL_CODE_COMPONENT_HAL_SYSRTC=hal_sysrtc
176
+ )
177
+ endif () # CONFIG_SOC_SILABS_SLEEPTIMER
178
+
179
+ zephyr_code_relocate(FILES
180
+ ${ZEPHYR_BASE} /arch/arm/core/cortex_m/isr_wrapper.c
181
+ LOCATION RAM
182
+ FILTER ".*"
183
+ )
184
+
154
185
zephyr_linker_sources(ROM_SECTIONS linker/code_classification_text.ld)
155
186
zephyr_linker_sources(RAMFUNC_SECTION linker/code_classification_ramfunc.ld)
Original file line number Diff line number Diff line change 4
4
5
5
rsource "*/Kconfig"
6
6
7
+ if SOC_FAMILY_SILABS_SIWX91X
8
+ source "soc/silabs/silabs_siwx91x/Kconfig"
9
+ endif
10
+
7
11
if SOC_FAMILY_SILABS_S0 || SOC_FAMILY_SILABS_S1 || SOC_FAMILY_SILABS_S2
8
12
9
13
config SOC_GECKO_SDID
Original file line number Diff line number Diff line change @@ -9,3 +9,8 @@ config SOC_FAMILY_SILABS_SIWX91X
9
9
select CPU_HAS_ARM_MPU
10
10
select HAS_SILABS_WISECONNECT
11
11
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 3
3
4
4
if SOC_FAMILY_SILABS_SIWX91X
5
5
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
+
6
16
config WISECONNECT_NETWORK_STACK
7
17
bool
8
18
select CMSIS_RTOS_V2
Original file line number Diff line number Diff line change 7
7
8
8
#include "si91x_device.h"
9
9
10
+ #define SYSRTC_IRQHandler IRQ022_Handler
11
+
10
12
#endif
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ manifest:
228
228
groups :
229
229
- hal
230
230
- name : hal_silabs
231
- revision : 9d32354344f6c816410e2642c2f81677f8a60e96
231
+ revision : 69473ad8b3a92d421fbce703766f6c9a5d5a5572
232
232
path : modules/hal/silabs
233
233
groups :
234
234
- hal
You can’t perform that action at this time.
0 commit comments