You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
AlvinHsiao
changed the title
[Platform] [Infineon] CYW30739 KVS check failed
[Platform] [Infineon] KVS not clean config value for CYW30739
Sep 14, 2022
The subject of this PR contains misleading descriptions. It's a general KVS implementation fix.
When writing a zero-size value, CYW30739 only writes the key of the value to the flash because the lower layer APIs of CYW30739 doesn't support writing a zero-size value.
CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size)
{
...
if (value_size != 0)
{
SuccessOrExit(err = CYW30739Config::WriteConfigValueBin(entry->GetValueConfigKey(), value, value_size));
}
...
}
CYW30739 only has to erase the key of a zero-size value from the flash rather than erase both the key and the value from the flash.
When the original codes tried to delete a non-existed value from the flash, the lower layer API would return an error and bypass the following codes. This is the bug we are trying to fix.
Reproduction steps
Platform
other
Platform Version(s)
No response
Type
Manually tested with SDK
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: