Skip to content

Commit

Permalink
[Infineon] Not to increment RebootCount if wakes from sleep state
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinHsiao committed Aug 3, 2023
1 parent ae43587 commit 1091744
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <platform/DiagnosticDataProvider.h>
#include <platform/Infineon/CYW30739/CYW30739Config.h>
#include <platform/KeyValueStoreManager.h>
#include <wiced_sleep.h>

namespace chip {
namespace DeviceLayer {
Expand All @@ -51,9 +52,11 @@ CHIP_ERROR ConfigurationManagerImpl::Init()
{
err = GetRebootCount(rebootCount);
SuccessOrExit(err);

err = StoreRebootCount(rebootCount + 1);
SuccessOrExit(err);
if (wiced_sleep_get_boot_mode() != WICED_SLEEP_FAST_BOOT)
{
err = StoreRebootCount(rebootCount + 1);
SuccessOrExit(err);
}
}
else
{
Expand Down

0 comments on commit 1091744

Please sign in to comment.