@@ -24,6 +24,14 @@ import("silabs_board.gni")
24
24
25
25
examples_plat_dir = " ${ chip_root } /examples/platform/silabs/SiWx917"
26
26
27
+ declare_args () {
28
+ # Enable the Alarm Based Wakeup for 917 SoC when sleep is enabled
29
+ si91x_alarm_based_wakeup = false
30
+
31
+ # Periodic time at which the 917 SoC should wakeup
32
+ si91x_alarm_periodic_time = 30
33
+ }
34
+
27
35
# Defines an siwx917 SDK build target.
28
36
#
29
37
# Parameters:
@@ -147,12 +155,12 @@ template("siwx917_sdk") {
147
155
" SILABS_LOG_ENABLED=${ silabs_log_enabled } " ,
148
156
" SL_HEAP_SIZE=32768" ,
149
157
" SL_WIFI=1" ,
150
- " CCP_SI917_BRINGUP" ,
158
+ " CCP_SI917_BRINGUP=1 " ,
151
159
" SL_COMPONENT_CATALOG_PRESENT" ,
152
- " RS911X_WIFI" ,
160
+ " RS911X_WIFI=1 " ,
153
161
" RSI_WLAN_ENABLE" ,
154
- " SLI_SI91X_ENABLE_OS" ,
155
- " SLI_SI91X_MCU_INTERFACE" , # Enable CCP bus Interface
162
+ " SLI_SI91X_ENABLE_OS=1 " ,
163
+ " SLI_SI91X_MCU_INTERFACE=1 " , # Enable CCP bus Interface
156
164
" RSI_WLAN_API_ENABLE" ,
157
165
" NVM3_DEFAULT_NVM_SIZE=40960" ,
158
166
" NVM3_DEFAULT_MAX_OBJECT_SIZE=4092" ,
@@ -163,43 +171,46 @@ template("siwx917_sdk") {
163
171
" __HEAP_SIZE=0" ,
164
172
" PLATFORM_HEADER=\" platform-header.h\" " ,
165
173
" USE_NVM3=1" ,
166
- " RSI_ARM_CM4F" ,
167
- " SIWX_917" ,
168
- " CHIP_9117" ,
174
+ " SIWX_917=1" ,
175
+ " CHIP_9117=1" ,
169
176
" SLI_SI91X_ENABLE_BLE=1" ,
170
177
" SL_SI91X_ENABLE_LITTLE_ENDIAN=1" ,
171
178
" TINYCRYPT_PRIMITIVES" ,
172
179
" OPTIMIZE_TINYCRYPT_ASM" ,
173
180
" __error_t_defined" ,
174
181
" RSI_SAMPLE_HAL" ,
175
- " ENABLE_IPMU_APIS" ,
176
- " SLI_SI91X_MCU_MOV_ROM_API_TO_FLASH" ,
177
- " DEBUG_UART" ,
178
- " SLI_SI91X_MCU_ENABLE_FLASH_BASED_EXECUTION" ,
179
- " SL_WIFI_COMPONENT_INCLUDED" ,
182
+ " DEBUG_UART=1" ,
183
+ " SLI_SI91X_MCU_ENABLE_FLASH_BASED_EXECUTION=1" ,
184
+ " SL_WIFI_COMPONENT_INCLUDED=1" ,
180
185
" SLI_SI917=1" ,
186
+ " SI917=1" ,
181
187
" ROMDRIVER_PRESENT=1" ,
182
188
" SL_CATALOG_FREERTOS_KERNEL_PRESENT=1" ,
183
- " SL_PLATFORM_EXAMPLES_ENABLE" ,
184
189
" SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER=1" ,
185
- " FLASH_PAGE_SIZE" ,
186
- " SL_NVM3_PRESENT" ,
187
- " ROM_WIRELESS" ,
188
190
" BRD4325A" , # TODO: should be removed after SoC macro clean-up
189
- " CONNECTIVITY_PLATFORM" ,
190
- " SLI_SI917B0 = 1" ,
191
+ " SLI_SI917B0=1" ,
191
192
" SLI_SI91X_MCU_COMMON_FLASH_MODE=1" ,
192
- " EXECUTION_FROM_RAM" ,
193
193
" SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2=1" ,
194
194
" SL_BOARD_REV=\" A00\" " ,
195
195
" SPI_MULTI_SLAVE=1" ,
196
196
" SYSCALLS_WRITE=1" ,
197
- " SI91X_SYSRTC_COUNT=1" ,
198
- " SSI_ULP_MASTER=1" ,
199
- " SL_MEMLCD_EXTCOMIN_PORT=0" ,
200
197
" __STATIC_INLINE=static inline" ,
201
- " SL_SI91X_SI917_RAM_MEM_CONFIG=3 " ,
198
+ " SL_SI91X_SI917_RAM_MEM_CONFIG=2 " ,
202
199
" SL_SI91x_DUAL_INTERRUPTS_ERRATA=1" ,
200
+ " EXT_IRQ_COUNT=75" ,
201
+ " FLASH_PAGE_SIZE=1" ,
202
+ " DEBUG_ENABLE=1" ,
203
+ " ENABLE_DEBUG_MODULE=1" ,
204
+ " SI91X_SYSRTC_PRESENT=1" ,
205
+ " TA_DEEP_SLEEP_COMMON_FLASH=1" ,
206
+ " SI917_SOC=1" ,
207
+ " SI91X_PLATFORM=1" ,
208
+ " SL_NET_COMPONENT_INCLUDED=1" ,
209
+ " SRAM_BASE=0x0cUL" ,
210
+ " SRAM_SIZE=0x4fc00UL" ,
211
+ " SLI_SI91X_MCU_ENABLE_IPMU_APIS=1" ,
212
+ " RADIO_CONFIG_DMP_SUPPORT=1" ,
213
+ " configUSE_POSIX_ERRNO=1" ,
203
214
]
204
215
205
216
if (chip_build_libshell ) {
@@ -254,13 +265,21 @@ template("siwx917_sdk") {
254
265
255
266
if (chip_enable_icd_server ) {
256
267
defines += [
257
- " WIFI_DEBUG_ENABLED=1" ,
258
268
" SL_ICD_ENABLED=1" ,
259
269
" SL_ACTIVE_MODE_THRESHOLD=${ sl_active_mode_threshold_ms } " ,
260
270
" SL_ACTIVE_MODE_INTERVAL=${ sl_active_mode_interval_ms } " ,
261
271
" SL_IDLE_MODE_INTERVAL=${ sl_idle_mode_interval_s } " ,
262
272
" SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${ sl_icd_supported_clients_per_fabric } " ,
273
+ " SL_SI91X_MCU_WIRELESS_BASED_WAKEUP=1" ,
274
+ " SL_SI91X_MCU_BUTTON_BASED_WAKEUP=1" ,
263
275
]
276
+
277
+ if (si91x_alarm_based_wakeup ) {
278
+ defines += [
279
+ " SL_SI91X_MCU_ALARM_BASED_WAKEUP=1" ,
280
+ " ALARM_PERIODIC_TIME=${ si91x_alarm_periodic_time } " ,
281
+ ]
282
+ }
264
283
}
265
284
266
285
if (chip_build_libshell ) { # matter shell
@@ -477,6 +496,13 @@ template("siwx917_sdk") {
477
496
]
478
497
}
479
498
499
+ if (chip_enable_icd_server ) {
500
+ sources += [
501
+ " ${ sdk_support_root } /matter/si91x/siwx917/BRD4338A/support/src/sl_si91x_m4_ps.c" ,
502
+ " ${ wifi_sdk_root } /components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_rtc.c" ,
503
+ " ${ wifi_sdk_root } /components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_time_period.c" ,
504
+ ]
505
+ }
480
506
public_deps = [
481
507
" :siwx917_mbedtls_config" ,
482
508
" ${ segger_rtt_root } :segger_rtt" ,
@@ -506,6 +532,9 @@ template("siwx917_sdk") {
506
532
]
507
533
}
508
534
509
- public_configs = [ " :${ sdk_target_name } _config" ]
535
+ public_configs = [
536
+ " :${ sdk_target_name } _config" ,
537
+ " ${ examples_plat_dir } :siwx917-common-config" ,
538
+ ]
510
539
}
511
540
}
0 commit comments