Skip to content

Commit 34f8000

Browse files
chirag-silabsrestyled-commits
authored andcommitted
[Silabs] [917SoC] Fixing sleepy with non LCD build fix (project-chip#34272)
* fixing sleepy and non lcd build fix * merging the icd and non lcd case * Restyled by gn * addressing the review comments --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 985cfd7 commit 34f8000

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

src/platform/silabs/KeyValueStoreManagerImpl.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,9 @@ void KeyValueStoreManagerImpl::ScheduleKeyMapSave(void)
164164
During commissioning, the key map will be modified multiples times subsequently.
165165
Commit the key map in nvm once it as stabilized.
166166
*/
167-
#if SLI_SI91X_MCU_INTERFACE && CHIP_CONFIG_ENABLE_ICD_SERVER
168-
// TODO: Remove this when RTC timer is added MATTER-2705
169-
SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_KvsStringKeyMap, reinterpret_cast<const uint8_t *>(mKvsKeyMap),
170-
sizeof(mKvsKeyMap));
171-
#else
172167
SystemLayer().StartTimer(
173168
std::chrono::duration_cast<System::Clock::Timeout>(System::Clock::Seconds32(SILABS_KVS_SAVE_DELAY_SECONDS)),
174169
KeyValueStoreManagerImpl::OnScheduledKeyMapSave, NULL);
175-
#endif // defined(SLI_SI91X_MCU_INTERFACE) && CHIP_CONFIG_ENABLE_ICD_SERVER
176170
}
177171

178172
CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size,

third_party/silabs/SiWx917_sdk.gni

+16-5
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,20 @@ template("siwx917_sdk") {
291291
if (invoker.enable_dic) {
292292
_include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ]
293293
}
294+
295+
if (chip_enable_icd_server || !disable_lcd) {
296+
defines += [
297+
"SL_SLEEP_TIMER=1",
298+
"SI91X_SYSRTC_COUNT=1",
299+
]
300+
}
301+
294302
if (!disable_lcd) {
295303
defines += [
296304
"CONFIG_ENABLE_UART",
297-
"SI91X_SYSRTC_COUNT=1",
298305
"SYSCALLS_WRITE",
299306
"SPI_MULTI_SLAVE",
300307
"SL_ULP_TIMER",
301-
"SL_SLEEP_TIMER",
302308
]
303309
}
304310

@@ -755,6 +761,14 @@ template("siwx917_sdk") {
755761
]
756762
}
757763

764+
if (chip_enable_icd_server || !disable_lcd) {
765+
sources += [
766+
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer.c",
767+
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_sysrtc.c",
768+
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/src/sl_sleeptimer_hal_si91x_sysrtc.c",
769+
]
770+
}
771+
758772
if (!disable_lcd) {
759773
sources += [
760774
"${efr32_sdk_root}/platform/middleware/glib/dmd/display/dmd_memlcd.c",
@@ -769,13 +783,10 @@ template("siwx917_sdk") {
769783
"${efr32_sdk_root}/platform/middleware/glib/glib/glib_polygon.c",
770784
"${efr32_sdk_root}/platform/middleware/glib/glib/glib_rectangle.c",
771785
"${efr32_sdk_root}/platform/middleware/glib/glib/glib_string.c",
772-
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer.c",
773786
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.c",
774787
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/src/memlcd_917/sl_memlcd_spi.c",
775788
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/src/sl_memlcd.c",
776789
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/src/sl_memlcd_display.c",
777-
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_sysrtc.c",
778-
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/src/sl_sleeptimer_hal_si91x_sysrtc.c",
779790
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_ulp_timer.c",
780791
]
781792
}

0 commit comments

Comments
 (0)