diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 9079c66b80818f..2ea7cd471c2b8a 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -27,12 +27,11 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true -enable_synchronized_sed = true chip_subscription_timeout_resumption = false sl_use_subscription_synching = true # Openthread Configuration flags -sl_ot_idle_interval_ms = 500 # 30s Idle Intervals +sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals sl_ot_active_interval_ms = 500 # 500ms Active Intervals # ICD Matter Configuration flags diff --git a/examples/light-switch-app/silabs/src/AppTask.cpp b/examples/light-switch-app/silabs/src/AppTask.cpp index 2083a6a885c577..c9759d24118fdd 100644 --- a/examples/light-switch-app/silabs/src/AppTask.cpp +++ b/examples/light-switch-app/silabs/src/AppTask.cpp @@ -25,33 +25,24 @@ #include "AppConfig.h" #include "AppEvent.h" #include "BindingHandler.h" - -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#include "sl_power_manager.h" -#endif - #include "LEDWidget.h" - #include "LightSwitchMgr.h" - #ifdef DISPLAY_ENABLED #include "lcd.h" #ifdef QR_CODE_ENABLED #include "qrcodegen.h" #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED - #include #include #include #include #include #include +#include #include #include -#include - /********************************************************** * Defines and Constants *********************************************************/ @@ -128,12 +119,6 @@ void AppTask::AppTaskMain(void * pvParameter) #endif SILABS_LOG("App Task started"); - -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - SILABS_LOG("----------------------------------------------- ADING EM1 requirement ---------------------------------"); - sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1); -#endif - while (true) { BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 729440aa5d9ffa..cde56f8029f6da 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -27,12 +27,11 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true -enable_synchronized_sed = true chip_subscription_timeout_resumption = false sl_use_subscription_synching = true # Openthread Configuration flags -sl_ot_idle_interval_ms = 500 # 5s Idle Intervals +sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals sl_ot_active_interval_ms = 500 # 500ms Active Intervals # ICD Matter Configuration flags diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 3356e5b8f2f262..e9fed8d924c3e0 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -87,10 +87,6 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include #include -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#include "sl_power_manager.h" -#endif - // ================================================================================ // Matter Networking Callbacks // ================================================================================ @@ -152,20 +148,6 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec), InitOTARequestorHandler, nullptr); #endif - - SILABS_LOG("------------------------------------ Send Data Request -------------------------------------") - otLinkSendDataRequest(chip::DeviceLayer::ThreadStackMgrImpl().OTInstance()); - - } - - if (event->Type == DeviceLayer::DeviceEventType::kCommissioningComplete) - { -#if CHIP_ENABLE_OPENTHREAD -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - SILABS_LOG("------------------------------------ REMOVE EM 1 REQUIREMENT -------------------------------------") - sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); -#endif -#endif // CHIP_ENABLE_OPENTHREAD } } diff --git a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h index 56fc6ea87d8be8..d7492f4044f3fa 100644 --- a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h @@ -45,42 +45,39 @@ // Timeout after 2 missed checkin or 4 mins if sleep interval is too short. #define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT ((SL_MLE_TIMEOUT_s < 120) ? 240 : ((SL_MLE_TIMEOUT_s * 2) + 1)) +#if defined(SL_CSL_ENABLE) && SL_CSL_ENABLE #define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1 #define OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE 1 #define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1 #define OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT 0 +#define OPENTHREAD_CONFIG_CSL_RECEIVE_TIME_AHEAD 750 +#define OPENTHREAD_CONFIG_CSL_TIMEOUT SL_CSL_TIMEOUT #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 200 +#endif // SL_CSL_ENABLE + #endif // SL_ICD_ENABLED /****Uncomment below section for OpenThread Debug logs*/ // #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG // #ifndef OPENTHREAD_CONFIG_LOG_CLI -// #define OPENTHREAD_CONFIG_LOG_CLI 1 +// #define OPENTHREAD_CONFIG_LOG_CLI 1 // #endif // #ifndef OPENTHREAD_CONFIG_LOG_PKT_DUMP -// #define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1 +// #define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1 // #endif // #ifndef OPENTHREAD_CONFIG_LOG_PLATFORM -// #define OPENTHREAD_CONFIG_LOG_PLATFORM 1 +// #define OPENTHREAD_CONFIG_LOG_PLATFORM 1 // #endif // #ifndef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL -// #define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1 +// #define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1 // #endif -// EFR32MG21A020F1024IM32 has 96k of RAM. Reduce the number of buffers to -// conserve RAM for this Series 2 part. -#if defined(EFR32MG21) -#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22 -#define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 512 -#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 512 -#endif - #define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 1 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 2042dc11876db7..54a2d614f13eb7 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -198,6 +198,10 @@ else optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " shift ;; + --ssed) + optArgs+="enable_synchronized_sed=true " + shift + ;; --low-power) optArgs+="chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true " shift diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 7aa9c48f613f69..2e7b9b9fc1d1cc 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -535,8 +535,10 @@ GenericThreadStackManagerImpl_OpenThread::_SetThreadDeviceType(Connec #endif case ConnectivityManager::kThreadDeviceType_MinimalEndDevice: case ConnectivityManager::kThreadDeviceType_SleepyEndDevice: +#if CHIP_DEVICE_CONFIG_THREAD_SSED case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice: break; +#endif default: ExitNow(err = CHIP_ERROR_INVALID_ARGUMENT); } @@ -558,9 +560,11 @@ GenericThreadStackManagerImpl_OpenThread::_SetThreadDeviceType(Connec case ConnectivityManager::kThreadDeviceType_SleepyEndDevice: deviceTypeStr = "SLEEPY END DEVICE"; break; +#if CHIP_DEVICE_CONFIG_THREAD_SSED case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice: deviceTypeStr = "SYNCHRONIZED SLEEPY END DEVICE"; break; +#endif default: deviceTypeStr = "(unknown)"; break; @@ -592,7 +596,7 @@ GenericThreadStackManagerImpl_OpenThread::_SetThreadDeviceType(Connec case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice: linkMode.mDeviceType = false; linkMode.mRxOnWhenIdle = false; - linkMode.mNetworkData = true; + // linkMode.mNetworkData = true; break; default: break; diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index a81760b8239f43..415f89b4db04fb 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -49,7 +49,7 @@ declare_args() { # ICD Openthread Configuration flags sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals sl_ot_active_interval_ms = 200 # 200ms Active Intervals - + # SSED Specific configurations sl_ot_csl_timeout_sec = 30 # 30s CSL timeout @@ -301,13 +301,6 @@ template("efr32_sdk") { #"__STACK_SIZE=0", ] - if (!(use_silabs_thread_lib || use_silabs_thread_lib)) { - #Enabling this config temporarly to fix a build issue until - #official fix is pushed - - defines += [ "OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1" ] - } - # Temporary configuration to enable COAP specific configurations if (use_thread_coap_lib) { defines += [ "SL_USE_COAP_CONFIG=1" ] @@ -442,12 +435,8 @@ template("efr32_sdk") { if (enable_synchronized_sed) { defines += [ "CHIP_DEVICE_CONFIG_THREAD_SSED=1", - "OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1", - "OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1", - "OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE=1", - "OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT=0", - "SL_OPENTHREAD_CSL_TX_UNCERTAINTY=200", - "OPENTHREAD_CONFIG_CSL_TIMEOUT=${sl_ot_csl_timeout_sec}", + "SL_CSL_ENABLE=1", + "SL_CSL_TIMEOUT=${sl_ot_csl_timeout_sec}", ] } }