Skip to content

Commit 1dd2c28

Browse files
Added SPAM reset call in matter code
1 parent 186c7c3 commit 1dd2c28

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/platform/silabs/Rpc.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Efr32Device final : public Device
117117
osTimer_t mRebootTimerBuffer;
118118
osTimerAttr_t mRebootTimerAttr = { .name = "Reboot", .cb_mem = &mRebootTimerBuffer, .cb_size = osTimerCbSize };
119119

120-
static void RebootHandler(void * timerCbArg) { NVIC_SystemReset(); }
120+
static void RebootHandler(void * timerCbArg) { Silabs::GetPlatform().SoftwareReset(); }
121121
};
122122
#endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE
123123

@@ -225,6 +225,5 @@ void Init()
225225
// Start App task.
226226
sRpcTaskHandle = osThreadNew(RunRpcService, nullptr, &kRpcTaskAttr);
227227
}
228-
229228
} // namespace rpc
230229
} // namespace chip

src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
2121
#include <platform/silabs/OTAImageProcessorImpl.h>
2222
#include <platform/silabs/SilabsConfig.h>
23+
#include <platform/silabs/platformAbstraction/SilabsPlatform.h>
2324
#include <platform/silabs/wifi/WifiInterface.h>
2425

2526
#if CHIP_CONFIG_ENABLE_ICD_SERVER
@@ -42,7 +43,6 @@ extern "C" {
4243

4344
uint8_t flag = RPS_HEADER;
4445
static chip::OTAImageProcessorImpl gImageProcessor;
45-
4646
namespace chip {
4747

4848
// Define static memebers
@@ -229,7 +229,7 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context)
229229
// send system reset request to reset the MCU and upgrade the m4 image
230230
ChipLogProgress(SoftwareUpdate, "SoC Soft Reset initiated!");
231231
// Reboots the device
232-
sl_si91x_soc_nvic_reset();
232+
DeviceLayer::Silabs::GetPlatform().SoftwareReset();
233233
}
234234
}
235235

0 commit comments

Comments
 (0)