[Silabs] Update Silabs SDK versions (#33229)
* Update SDK to latest versions
* Update docker version
* Update slcp with new gsdk version
* Update gitmodules
* Update matter support submodule
* Refactor Sleepy APIs for 917
* restyle
* update cloud build
---------
Co-authored-by: Rohan Sahay <Rohan.Sahay@silabs.com>
diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml
index 019807f..b160b8e 100644
--- a/.github/workflows/examples-efr32.yaml
+++ b/.github/workflows/examples-efr32.yaml
@@ -40,7 +40,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-efr32:47
+ image: ghcr.io/project-chip/chip-build-efr32:49
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml
index 1622808..435ab05 100644
--- a/.github/workflows/release_artifacts.yaml
+++ b/.github/workflows/release_artifacts.yaml
@@ -23,7 +23,7 @@
env:
CHIP_NO_LOG_TIMESTAMPS: true
-
+
jobs:
esp32:
name: ESP32
@@ -38,7 +38,7 @@
- name: Checkout
uses: actions/checkout@v4
with:
- ref: "${{ github.event.inputs.releaseTag }}"
+ ref: "${{ github.event.inputs.releaseTag }}"
- name: Bootstrap
uses: ./.github/actions/bootstrap
@@ -64,17 +64,18 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-efr32:47
+ image: ghcr.io/project-chip/chip-build-efr32:49
steps:
- name: Checkout
uses: actions/checkout@v4
with:
- ref: "${{ github.event.inputs.releaseTag }}"
+ ref: "${{ github.event.inputs.releaseTag }}"
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Build example EFR32 Lock App
- run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/
+ run:
+ scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/
out/lock_app_debug $SILABS_BOARD
- name: Upload artifact
diff --git a/.gitmodules b/.gitmodules
index be8c70f..c372f58 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -244,7 +244,7 @@
[submodule "third_party/silabs/gecko_sdk"]
path = third_party/silabs/gecko_sdk
url = https://github.com/SiliconLabs/gecko_sdk.git
- branch = v4.4.1
+ branch = v4.4.2
platforms = silabs
[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"]
path = third_party/silabs/wiseconnect-wifi-bt-sdk
@@ -254,7 +254,7 @@
[submodule "third_party/silabs/wifi_sdk"]
path = third_party/silabs/wifi_sdk
url = https://github.com/SiliconLabs/wiseconnect.git
- branch = v3.1.3
+ branch = v3.1.3-matter-hotfix.4
platforms = silabs
[submodule "editline"]
path = third_party/editline/repo
@@ -334,4 +334,3 @@
url = https://github.com/Infineon/optiga-trust-m.git
branch = matter_support
platforms = infineon
-
diff --git a/examples/platform/silabs/FreeRTOSConfig.h b/examples/platform/silabs/FreeRTOSConfig.h
index fd6658c..ec926f4 100644
--- a/examples/platform/silabs/FreeRTOSConfig.h
+++ b/examples/platform/silabs/FreeRTOSConfig.h
@@ -141,11 +141,21 @@
/* Energy saving modes. */
#if defined(SL_CATALOG_POWER_MANAGER_PRESENT)
#define configUSE_TICKLESS_IDLE 1
+#elif SL_ICD_ENABLED && SI917_M4_SLEEP_ENABLED
+#define configUSE_TICKLESS_IDLE 1
+#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 70
+#define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING(x) vTaskPreSuppressTicksAndSleepProcessing(&x)
+#define configPRE_SLEEP_PROCESSING(x) sl_wfx_host_si91x_sleep(&x)
+#define configPOST_SLEEP_PROCESSING(x) sl_si91x_post_sleep_update_ticks(&x)
#else
#define configUSE_TICKLESS_IDLE 0
#endif // SL_CATALOG_POWER_MANAGER_PRESENT
+#if defined(SLI_SI91X_MCU_INTERFACE)
+#define configTICK_RATE_HZ (1000)
+#else
#define configTICK_RATE_HZ (1024)
+#endif // SLI_SI91X_MCU_INTERFACE
/* Definition used by Keil to replace default system clock source. */
#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1
@@ -201,8 +211,11 @@
#define configUSE_PORT_OPTIMISED_TASK_SELECTION (0)
#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG (1) /* See into vPortSuppressTicksAndSleep source code for explanation */
#define configMAX_PRIORITIES (56)
-#define configMINIMAL_STACK_SIZE (320) /* Number of words to use for Idle and Timer stacks */
-
+#if SLI_SI91X_MCU_INTERFACE && SL_ICD_ENABLED
+#define configMINIMAL_STACK_SIZE (1024) /* Number of words to use for Idle and Timer stacks */
+#else // For EFR32
+#define configMINIMAL_STACK_SIZE (320) /* Number of words to use for Idle and Timer stacks */
+#endif // SLI_SI91X_MCU_INTERFACE && SL_ICD_ENABLED
#ifdef HEAP_MONITORING
#define configMAX_TASK_NAME_LEN (24)
#else
diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp
index d85f10d..9cc0305 100644
--- a/examples/platform/silabs/MatterConfig.cpp
+++ b/examples/platform/silabs/MatterConfig.cpp
@@ -43,7 +43,10 @@
#ifdef SLI_SI91X_MCU_INTERFACE
#include "wfx_rsi.h"
-#endif /* SLI_SI91X_MCU_INTERFACE */
+#if CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
+#include "rsi_m4.h"
+#endif // CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
+#endif // SLI_SI91X_MCU_INTERFACE
#include <crypto/CHIPCryptoPAL.h>
// If building with the EFR32-provided crypto backend, we can use the
@@ -342,7 +345,6 @@
sl_status_t status;
if ((status = wfx_wifi_rsi_init()) != SL_STATUS_OK)
{
- SILABS_LOG("wfx_wifi_rsi_init failed with status: %x", status);
ReturnErrorOnFailure((CHIP_ERROR) status);
}
#endif // SLI_SI91X_MCU_INTERFACE
@@ -354,9 +356,63 @@
// ================================================================================
// FreeRTOS Callbacks
// ================================================================================
+#if CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
+static bool is_sleep_ready = false;
+void vTaskPreSuppressTicksAndSleepProcessing(uint16_t * xExpectedIdleTime)
+{
+ // pointer check
+ if (xExpectedIdleTime == NULL)
+ {
+ return;
+ }
+
+ if (!is_sleep_ready)
+ {
+ *xExpectedIdleTime = 0;
+ }
+ else
+ {
+ // a preliminary check of the expected idle time is performed without making M4 inactive
+ if (*xExpectedIdleTime >= configEXPECTED_IDLE_TIME_BEFORE_SLEEP)
+ {
+ // Indicate M4 is Inactive
+ P2P_STATUS_REG &= ~M4_is_active;
+ // Waiting for one more clock cycle to make sure M4 H/W Register is updated
+ P2P_STATUS_REG;
+
+ // TODO: This delay is added to sync between M4 and TA. It should be removed once the logic is moved to wifi SDK
+ for (uint8_t delay = 0; delay < 10; delay++)
+ {
+ __ASM("NOP");
+ }
+ // Checking if TA has already triggered a packet to M4
+ // RX_BUFFER_VALID will be cleared by TA if any packet is triggered
+ if ((P2P_STATUS_REG & TA_wakeup_M4) || (P2P_STATUS_REG & M4_wakeup_TA) || (!(M4SS_P2P_INTR_SET_REG & RX_BUFFER_VALID)))
+ {
+ P2P_STATUS_REG |= M4_is_active;
+ *xExpectedIdleTime = 0;
+ }
+ else
+ {
+ M4SS_P2P_INTR_CLR_REG = RX_BUFFER_VALID;
+ M4SS_P2P_INTR_CLR_REG;
+
+ TASS_P2P_INTR_MASK_SET = (TX_PKT_TRANSFER_DONE_INTERRUPT | RX_PKT_TRANSFER_DONE_INTERRUPT |
+ TA_WRITING_ON_COMM_FLASH | NWP_DEINIT_IN_COMM_FLASH
+#ifdef SL_SI91X_SIDE_BAND_CRYPTO
+ | SIDE_BAND_CRYPTO_DONE
+#endif
+ );
+ }
+ }
+ }
+}
+#endif // CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
extern "C" void vApplicationIdleHook(void)
{
-#if SLI_SI91X_MCU_INTERFACE && CHIP_CONFIG_ENABLE_ICD_SERVER
- sl_wfx_host_si91x_sleep_wakeup();
-#endif
+#if CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
+ invoke_btn_press_event();
+ // is_sleep_ready is required since wfx_is_sleep_ready() is not FreeRTOS scheduler agnostic
+ is_sleep_ready = wfx_is_sleep_ready();
+#endif // CHIP_CONFIG_ENABLE_ICD_SERVER && SI917_M4_SLEEP_ENABLED
}
diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp
index a8dc13c..1759d2d 100644
--- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp
+++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp
@@ -78,6 +78,11 @@
WfxRsi_t wfx_rsi;
+// TODO: remove this. Added only to monitor how many watch dog reset have happened during testing.
+#ifdef SLI_SI91X_MCU_INTERFACE
+volatile uint32_t watchdog_reset = 0;
+#endif // SLI_SI91X_MCU_INTERFACE
+
/* Declare a variable to hold the data associated with the created event group. */
StaticEventGroup_t rsiDriverEventGroup;
@@ -274,42 +279,52 @@
#if SL_ICD_ENABLED
-#if SLI_SI91X_MCU_INTERFACE
-/******************************************************************
- * @fn sl_wfx_host_si91x_sleep_wakeup()
- * @brief
- * M4 going to sleep
- *
- * @param[in] None
- * @return
- * None
- *********************************************************************/
-void sl_wfx_host_si91x_sleep_wakeup()
+#if SI917_M4_SLEEP_ENABLED
+// Required to invoke button press event during sleep as falling edge is not detected
+void invoke_btn_press_event()
{
- if (wfx_rsi.dev_state & WFX_RSI_ST_SLEEP_READY)
+ // TODO: should be removed once we are getting the press interrupt for button 0 with sleep
+ if (!RSI_NPSSGPIO_GetPin(SL_BUTTON_BTN0_PIN) && !btn0_pressed)
{
- // TODO: should be removed once we are getting the press interrupt for button 0 with sleep
- if (!RSI_NPSSGPIO_GetPin(SL_BUTTON_BTN0_PIN) && !btn0_pressed)
- {
- sl_button_on_change(SL_BUTTON_BTN0_NUMBER, BUTTON_PRESSED);
- btn0_pressed = true;
- }
- if (RSI_NPSSGPIO_GetPin(SL_BUTTON_BTN0_PIN))
- {
-#ifdef DISPLAY_ENABLED
- // if LCD is enabled, power down the lcd before setting the M4 to sleep
- sl_si91x_hardware_setup();
-#endif
- btn0_pressed = false;
- /* Configure RAM Usage and Retention Size */
- sl_si91x_m4_sleep_wakeup();
-#if SILABS_LOG_ENABLED
- silabsInitLog();
-#endif
- }
+ sl_button_on_change(SL_BUTTON_BTN0_NUMBER, BUTTON_PRESSED);
+ btn0_pressed = true;
+ }
+ if (RSI_NPSSGPIO_GetPin(SL_BUTTON_BTN0_PIN))
+ {
+ btn0_pressed = false;
}
}
-#endif // SLI_SI91X_MCU_INTERFACE
+
+/**
+ * @brief Checks if the Wi-Fi module is ready for sleep.
+ *
+ * This function checks if the Wi-Fi module is ready to enter sleep mode.
+ *
+ * @return true if the Wi-Fi module is ready for sleep, false otherwise.
+ */
+bool wfx_is_sleep_ready()
+{
+ // BRD4002A board BTN_PRESS is 0 when pressed, release is 1
+ // sli_si91x_is_sleep_ready requires OS Scheduler to be active
+ return ((RSI_NPSSGPIO_GetPin(SL_BUTTON_BTN0_PIN) != 0) && (wfx_rsi.dev_state & WFX_RSI_ST_SLEEP_READY) &&
+ sli_si91x_is_sleep_ready());
+}
+
+/**
+ * @brief Sleeps for a specified duration and then wakes up.
+ *
+ * This function puts the SI91x host into sleep mode for the specified duration
+ * in milliseconds and then wakes it up.
+ *
+ * @param sleep_time_ms The duration in milliseconds to sleep.
+ */
+void sl_wfx_host_si91x_sleep(uint16_t * sleep_time_ms)
+{
+ SL_ASSERT(sleep_time_ms != NULL);
+ sl_si91x_m4_sleep_wakeup(sleep_time_ms);
+}
+
+#endif // SI917_M4_SLEEP_ENABLED
/******************************************************************
* @fn wfx_rsi_power_save()
@@ -363,6 +378,13 @@
SILABS_LOG("wfx_wifi_rsi_init started");
sl_status_t status;
status = sl_wifi_init(&config, NULL, sl_wifi_default_event_handler);
+#ifdef SLI_SI91X_MCU_INTERFACE
+ // TODO: remove this. Added only to monitor how many watch dog reset have happened during testing.
+ if ((MCU_FSM->MCU_FSM_WAKEUP_STATUS_REG) & BIT(5))
+ {
+ watchdog_reset++;
+ }
+#endif // SLI_SI91X_MCU_INTERFACE
if (status != SL_STATUS_OK)
{
return status;
diff --git a/examples/platform/silabs/ldscripts/SiWx917-common.ld b/examples/platform/silabs/ldscripts/SiWx917-common.ld
index b0168a0..f23fecf 100644
--- a/examples/platform/silabs/ldscripts/SiWx917-common.ld
+++ b/examples/platform/silabs/ldscripts/SiWx917-common.ld
@@ -40,7 +40,7 @@
{
KEEP(*(.isr_vector))
KEEP(*(.reset_handler))
- *(EXCLUDE_FILE(*sl_si91x_bus.c.o *sl_si91x_driver.c.o *sli_si91x_multithreaded.c.o *rsi_hal_mcu_m4_ram.c.o *rsi_deepsleep_soc.c.o *croutine.c.o *event_groups.c.o *list.c.o *queue.c.o *stream_buffer.c.o *tasks.c.o *timers.c.o *cmsis_os2.c.o *freertos_umm_malloc_host.c.o *malloc_buffers.c.o *sl_rsi_utility.c.o *port.c.o *heap_*.c.o) .text*)
+ *(EXCLUDE_FILE(*sl_si91x_bus.c.o *sl_si91x_driver.c.o *sli_si91x_multithreaded.c.o *rsi_hal_mcu_m4_ram.c.o *rsi_hal_mcu_m4_rom.c.o *rsi_deepsleep_soc.c.o *croutine.c.o *event_groups.c.o *list.c.o *queue.c.o *stream_buffer.c.o *tasks.c.o *timers.c.o *cmsis_os2.c.o *freertos_umm_malloc_host.c.o *malloc_buffers.c.o *sl_rsi_utility.c.o *port.c.o *heap_*.c.o *os_systick.c.o *sl_wifi_if.c.o *sl_si91x_m4_ps.c.o *sl_platform_wireless.c.o) .text*)
/* .ctors */
*crtbegin.o(.ctors)
@@ -131,7 +131,8 @@
*sl_si91x_driver.c.o(.text*)
*sli_si91x_multithreaded.c.o(.text*)
*rsi_hal_mcu_m4_ram.c.o(.text*)
- *rsi_deepsleep_soc.c.o(.text*)
+ *rsi_hal_mcu_m4_rom.c.o(.text*)
+ *rsi_deepsleep_soc.c.o(.text*)
*croutine.c.o(.text*)
*event_groups.c.o(.text*)
*list.c.o(.text*)
@@ -145,6 +146,10 @@
*sl_rsi_utility.c.o(.text*)
*port.c.o(.text*)
*heap_*.c.o(.text*)
+ *os_systick.c.o(.text*)
+ *sl_wifi_if.c.o(.text*)
+ *sl_si91x_m4_ps.c.o(.text*)
+ *sl_platform_wireless.c.o(.text*)
. = ALIGN(4);
/* preinit data */
@@ -252,4 +257,3 @@
app_flash_end = 0x8202000 + 0x1fe000;
ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !")
}
-
diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp
index 3e1c52a..4f5d1ef 100644
--- a/examples/platform/silabs/matter-platform.slcp
+++ b/examples/platform/silabs/matter-platform.slcp
@@ -27,7 +27,7 @@
file_list:
- {path: app.h}
- {path: reset_util.h}
-sdk: {id: gecko_sdk, version: 4.3.1}
+sdk: {id: gecko_sdk, version: 4.4.2}
toolchain_settings: []
component:
diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml
index 5003d08..de4d5d9 100644
--- a/integrations/cloudbuild/smoke-test.yaml
+++ b/integrations/cloudbuild/smoke-test.yaml
@@ -66,7 +66,7 @@
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:47"
+ - name: "ghcr.io/project-chip/chip-build-vscode:49"
id: EFR32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
diff --git a/src/platform/silabs/SiWx917/BUILD.gn b/src/platform/silabs/SiWx917/BUILD.gn
index c0efdd6..2eee75d 100644
--- a/src/platform/silabs/SiWx917/BUILD.gn
+++ b/src/platform/silabs/SiWx917/BUILD.gn
@@ -73,7 +73,10 @@
]
}
- public_deps = [ "${chip_root}/src/platform:platform_base" ]
+ public_deps = [
+ "${chip_root}/src/app/icd/server:icd-server-config",
+ "${chip_root}/src/platform:platform_base",
+ ]
deps = [ "${chip_root}/src/platform/logging:headers" ]
# Add platform crypto implementation
diff --git a/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp b/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp
index ac5e8c3..60ee45d 100644
--- a/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp
+++ b/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp
@@ -35,9 +35,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-#include "sl_si91x_m4_ps.h"
-extern "C" uint8_t m4_alarm_initialization_done;
-extern "C" void set_alarm_interrupt_timer(uint16_t interval);
+
#ifdef __cplusplus
}
#endif
@@ -203,12 +201,6 @@
********************************************************************************************/
void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin)
{
-#if SL_ICD_ENABLED
- if (m4_alarm_initialization_done == false)
- {
- initialize_m4_alarm();
- }
-#endif // SL_ICD_ENABLED
if (!is_wifi_disconnection_event)
{
/* After the reboot or a commissioning time device failed to connect with AP.
@@ -221,18 +213,10 @@
// TODO: cleanup the retry logic MATTER-1921
if (!chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen())
{
- set_alarm_interrupt_timer(WLAN_RETRY_TIMER_MS / 1000);
wfx_rsi_power_save(RSI_SLEEP_MODE_8, STANDBY_POWER_SAVE_WITH_RAM_RETENTION);
- // TODO: remove this once TICKLESS_IDLE is applied. MATTER-3134
- sl_wfx_host_si91x_sleep_wakeup();
}
- else
- {
- vTaskDelay(pdMS_TO_TICKS(WLAN_RETRY_TIMER_MS));
- }
-#else
- vTaskDelay(pdMS_TO_TICKS(WLAN_RETRY_TIMER_MS));
#endif // SL_ICD_ENABLED
+ vTaskDelay(pdMS_TO_TICKS(WLAN_RETRY_TIMER_MS));
}
else
{
@@ -252,13 +236,9 @@
}
SILABS_LOG("wfx_retry_interval_handler : Next attempt after %d Seconds", CONVERT_MS_TO_SEC(retryInterval));
#if SL_ICD_ENABLED
- set_alarm_interrupt_timer(retryInterval / 1000);
wfx_rsi_power_save(RSI_SLEEP_MODE_8, STANDBY_POWER_SAVE_WITH_RAM_RETENTION);
- // TODO: remove this once TICKLESS_IDLE is applied. MATTER-3134
- sl_wfx_host_si91x_sleep_wakeup();
-#else
- vTaskDelay(pdMS_TO_TICKS(retryInterval));
#endif // SL_ICD_ENABLED
+ vTaskDelay(pdMS_TO_TICKS(retryInterval));
retryInterval += retryInterval;
}
}
diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
index ba95767..1d4456a 100644
--- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
+++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
@@ -20,9 +20,11 @@
#include <FreeRTOS.h>
#include <task.h>
+#include <app/icd/server/ICDServerConfig.h>
+
#if SILABS_LOG_ENABLED
#include "silabs_utils.h"
-#endif
+#endif // SILABS_LOG_ENABLED
// TODO add includes ?
extern "C" {
@@ -33,12 +35,11 @@
#include "sl_si91x_button_pin_config.h"
#include "sl_si91x_led.h"
#include "sl_si91x_led_config.h"
-void soc_pll_config(void);
-}
-#if SILABS_LOG_ENABLED
-#include "silabs_utils.h"
-#endif
+#if CHIP_CONFIG_ENABLE_ICD_SERVER == 0
+void soc_pll_config(void);
+#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
+}
#ifdef SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT
#include "SEGGER_SYSVIEW.h"
@@ -47,11 +48,12 @@
namespace chip {
namespace DeviceLayer {
namespace Silabs {
-#if SL_ICD_ENABLED
namespace {
+uint8_t sButtonStates[SL_SI91x_BUTTON_COUNT] = { 0 };
+#if CHIP_CONFIG_ENABLE_ICD_SERVER
bool btn0_pressed = false;
-}
#endif /* SL_ICD_ENABLED */
+} // namespace
SilabsPlatform SilabsPlatform::sSilabsPlatformAbstractionManager;
SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr;
@@ -63,10 +65,10 @@
// TODO: Setting the highest priority for SVCall_IRQn to avoid the HardFault issue
NVIC_SetPriority(SVCall_IRQn, CORE_INTERRUPT_HIGHEST_PRIORITY);
-#ifndef SL_ICD_ENABLED
+#if CHIP_CONFIG_ENABLE_ICD_SERVER == 0
// Configuration the clock rate
soc_pll_config();
-#endif
+#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#if SILABS_LOG_ENABLED
silabsInitLog();
@@ -143,6 +145,10 @@
return;
}
+ if (btn < SL_SI91x_BUTTON_COUNT)
+ {
+ sButtonStates[btn] = btnAction;
+ }
Silabs::GetPlatform().mButtonCallback(btn, btnAction);
}
}
diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni
index 00e077d..48abc72 100644
--- a/third_party/silabs/SiWx917_sdk.gni
+++ b/third_party/silabs/SiWx917_sdk.gni
@@ -26,10 +26,13 @@
declare_args() {
# Enable the Alarm Based Wakeup for 917 SoC when sleep is enabled
- si91x_alarm_based_wakeup = false
+ si91x_alarm_based_periodic_wakeup = false
# Periodic time at which the 917 SoC should wakeup
si91x_alarm_periodic_time = 30
+
+ # enable 917 SoC M4 sleep wakeup
+ si917_m4_sleep_enabled = false
}
# Defines an siwx917 SDK build target.
@@ -206,7 +209,7 @@
"SPI_MULTI_SLAVE=1",
"SYSCALLS_WRITE=1",
"__STATIC_INLINE=static inline",
- "SL_SI91X_SI917_RAM_MEM_CONFIG=2",
+ "SL_SI91X_SI917_RAM_MEM_CONFIG=3",
"SL_SI91x_DUAL_INTERRUPTS_ERRATA=1",
"EXT_IRQ_COUNT=75",
"FLASH_PAGE_SIZE=1",
@@ -221,6 +224,7 @@
"SLI_SI91X_MCU_ENABLE_IPMU_APIS=1",
"RADIO_CONFIG_DMP_SUPPORT=1",
"configUSE_POSIX_ERRNO=1",
+ "NVM3_LOCK_OVERRIDE=1",
]
if (silabs_log_enabled && chip_logging) {
@@ -271,6 +275,8 @@
"SI91X_SYSRTC_COUNT=1",
"SYSCALLS_WRITE",
"SPI_MULTI_SLAVE",
+ "SL_ULP_TIMER",
+ "SL_SLEEP_TIMER",
]
}
@@ -288,12 +294,17 @@
"SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${sl_icd_supported_clients_per_fabric}",
"SL_SI91X_MCU_WIRELESS_BASED_WAKEUP=1",
"SL_SI91X_MCU_BUTTON_BASED_WAKEUP=1",
+ "SL_SI91X_MCU_ALARM_BASED_WAKEUP=1",
]
- if (si91x_alarm_based_wakeup) {
+ if (si91x_alarm_based_periodic_wakeup) {
+ defines += [ "ALARM_PERIODIC_TIME=${si91x_alarm_periodic_time}" ]
+ }
+
+ if (si917_m4_sleep_enabled) {
defines += [
- "SL_SI91X_MCU_ALARM_BASED_WAKEUP=1",
- "ALARM_PERIODIC_TIME=${si91x_alarm_periodic_time}",
+ "SI917_M4_SLEEP_ENABLED=1",
+ "XTAL_OFF",
]
}
}
@@ -532,7 +543,7 @@
if (chip_enable_icd_server) {
sources += [
- "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/src/sl_si91x_m4_ps.c",
+ "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c",
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_rtc.c",
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_time_period.c",
]
diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk
index 911f6cd..e359ba4 160000
--- a/third_party/silabs/gecko_sdk
+++ b/third_party/silabs/gecko_sdk
@@ -1 +1 @@
-Subproject commit 911f6cdefccbae03bc66e8c790ceb7e67ca07417
+Subproject commit e359ba40a2ba5b127964a6e7afe9e70ff5f9a1cf
diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support
index 0dbd0dd..56d4d4e 160000
--- a/third_party/silabs/matter_support
+++ b/third_party/silabs/matter_support
@@ -1 +1 @@
-Subproject commit 0dbd0dd89fa90dc6e0d1d2636563ea980c010c19
+Subproject commit 56d4d4ec0dea032302f52632c15d4d7813f8e9f5
diff --git a/third_party/silabs/wifi_sdk b/third_party/silabs/wifi_sdk
index 00dd57a..aa514d4 160000
--- a/third_party/silabs/wifi_sdk
+++ b/third_party/silabs/wifi_sdk
@@ -1 +1 @@
-Subproject commit 00dd57a85e0982f85a41d029e15050479f69256b
+Subproject commit aa514d4fac4b568d03e1f6d3d19c7811034d5077