Hi, @Tome-mbedded
u16ActivityCount Where does the value of this variable come from?
==> Please see below for the source of u16ActivityCount.
#ifdef APP_LOW_POWER_API
#ifndef K32W148EVK
u16ActivityCount = mLPMFlag;
#else
u16ActivityCount = PWRM_u16GetActivityCount();
#endif
#else
u16ActivityCount = PWRM_u16GetActivityCount();
#endif
So you need to check the MACRO: APP_LOW_POWER_API and K32W148EVK.
If you are not sure, you can add some wrong method, and try to compile to see whether have compile errors.
And for your information: PWRM_u16GetActivityCount() function is defined in our internal SDK. There is no source code available for us. We only provide this API, you can check docs/wireless/Zigbee/JN-UG-3133-Core-Utilities.pdf in your SDK directory to see explanation of this API.
And mLPMFlag is defined in the middleware/wireless/framework/LowPower/Source/jn5189dk6/PWR.c
uint8_t mLPMFlag = gAllowDeviceToSleep_c;
Then
middleware/wireless/framework/LowPower/Interface/jn5189dk6/PWR_Interface.h
#ifndef gAllowDeviceToSleep_c
#define gAllowDeviceToSleep_c 0
#endif
Best regards,
Christine.