From 01dafeabb4e4c60a2b74edd0e36862a147178353 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs Date: Thu, 28 Nov 2024 16:15:25 -0500 Subject: [PATCH] Deactivating log that causes stack overflow in series 3 --- src/include/platform/CHIPDeviceConfig.h | 2 +- src/platform/silabs/efr32/BLEManagerImpl.cpp | 6 ++++-- src/platform/silabs/tracing/SilabsTracing.h | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index 87fdfad76a..daba216ae9 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -636,7 +636,7 @@ * Defaults to 30000 (30 seconds). */ #ifndef CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME -#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 30000 +#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 2000 #endif /** diff --git a/src/platform/silabs/efr32/BLEManagerImpl.cpp b/src/platform/silabs/efr32/BLEManagerImpl.cpp index 1f8704896f..bc63ca1358 100644 --- a/src/platform/silabs/efr32/BLEManagerImpl.cpp +++ b/src/platform/silabs/efr32/BLEManagerImpl.cpp @@ -1005,7 +1005,8 @@ void BLEManagerImpl::BleAdvTimeoutHandler(void * arg) { if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) { - ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); + // TODO : This log causes a stack overflow in Series 3, need to investigate before re-enabling + // ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); BLEMgrImpl().mFlags.Set(Flags::kAdvertising); BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); #if CHIP_DEVICE_CONFIG_EXT_ADVERTISING @@ -1016,7 +1017,8 @@ void BLEManagerImpl::BleAdvTimeoutHandler(void * arg) #if CHIP_DEVICE_CONFIG_EXT_ADVERTISING else { - ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); + // TODO : This log causes a stack overflow in Series 3, need to investigate before re-enabling + // ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); BLEMgrImpl().mFlags.Set(Flags::kAdvertising); BLEMgrImpl().mFlags.Set(Flags::kExtAdvertisingEnabled); BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); diff --git a/src/platform/silabs/tracing/SilabsTracing.h b/src/platform/silabs/tracing/SilabsTracing.h index 8c257bb194..3db82e0db7 100644 --- a/src/platform/silabs/tracing/SilabsTracing.h +++ b/src/platform/silabs/tracing/SilabsTracing.h @@ -117,8 +117,8 @@ class SilabsTracer { public: static constexpr size_t kNumTraces = to_underlying(TimeTraceOperation::kNumTraces); - static constexpr size_t kMaxBufferedTraces = 64; - static constexpr size_t kMaxTraceSize = 256; + static constexpr size_t kMaxBufferedTraces = 32; + static constexpr size_t kMaxTraceSize = 128; /** @brief Get the singleton instance of SilabsTracer */ static SilabsTracer & Instance() { return sInstance; }