Skip to content

Commit

Permalink
Update default sleeping time (#23783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Jan 19, 2023
1 parent 09ba27d commit 2baa873
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/platform/silabs/efr32/project_include/OpenThreadConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,31 @@
// Enable use of external heap allocator (calloc/free) for OpenThread.
#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1

#if CHIP_DEVICE_CONFIG_ENABLE_SED
#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 0
// In seconds
#define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT (SL_SLEEP_TIME_MS / 1000)
#endif

/****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
// #endif

// #ifndef OPENTHREAD_CONFIG_LOG_PKT_DUMP
// #define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1
// #endif

// #ifndef OPENTHREAD_CONFIG_LOG_PLATFORM
// #define OPENTHREAD_CONFIG_LOG_PLATFORM 1
// #endif

// #ifndef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL
// #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)
Expand Down
8 changes: 8 additions & 0 deletions src/platform/silabs/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@
#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024)
#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE

#ifndef CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL
#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL chip::System::Clock::Milliseconds32(SL_SLEEP_TIME_MS)
#endif // CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL

#ifndef CHIP_DEVICE_CONFIG_SED_ACTIVE_INTERVAL
#define CHIP_DEVICE_CONFIG_SED_ACTIVE_INTERVAL chip::System::Clock::Milliseconds32(200)
#endif // CHIP_DEVICE_CONFIG_SED_ACTIVE_INTERVAL

#ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE
#if defined(EFR32MG21)
#define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (2 * 1024)
Expand Down
3 changes: 3 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ declare_args() {

# Enable Segger System View
use_system_view = false

sleep_time_ms = 3300000 # 55 mins sleep
}

# Explorer Kit and MGM240L do not have external flash
Expand Down Expand Up @@ -223,6 +225,7 @@ template("efr32_sdk") {
"CHIP_DEVICE_CONFIG_ENABLE_SED=1",
"SL_CATALOG_POWER_MANAGER_PRESENT",
"SL_CATALOG_SLEEPTIMER_PRESENT",
"SL_SLEEP_TIME_MS=${sleep_time_ms}",
]
}
}
Expand Down

0 comments on commit 2baa873

Please sign in to comment.