Hello everybody,
i am working on a projekt based on the openthread example lped_bm. I am using the nxp OM15076-3 board with the router application as connection point and a slef made device with the AW-CU484 Module(Based on k32w061).
I can establish a conection between the two devices and transmit data sucessfully.
The power down mode is enabled by the following defines:
/* Enable low power module */
#define gLpmIncluded_d 1
/* Disable BLE support in low power module */
#define gSupportBle 0
#if gLpmIncluded_d
#define cPWR_UsePowerDownMode TRUE
#define cPWR_FullPowerDownMode TRUE
#endif
I have the problem that the device doesn't go to the power down mode, as expected.
If I set a breakpoint in the function APP_HandleLowPowerOnIdle() in app_init.c I can see, that the low power mode is never activated by calling the PWR_EnterLowPower(). I think the reason is, that the bSleepAllowed variable is set to FALSE and is not set back to TRUE.
I searched for the functions, that act with the bSleepAllowed variable which are App_AllowDeviceToSleep() and App_DisallowDeviceToSleep(). There is no call of these functions, but the initial state of bSleepAllowed is changed and the power down mode is never activated.
Has anybody sucessfully used the lped_bm example with the power down mode?
Thanks
Micha
Hi Recardo,
thanks for the reply. To make sure, I don't have any trouble with my board I switched over to the NXP demo Board. I used the example application lped_bm. In this setting I have the same problem. The PWR_EnterLowPower() is not called, because the bSleepAllowed is False(0). The board is connected to a router demo application and I can send messages from the demo board to the router. Do I have to change any define/setting at the demo application to get it working? I am using SDK version 2.6.3. Which version are you using?
Kind regards
Micha
Hi Micha,
I didn't change any configuration of the example. I am also using version 2.6.3. Can you identify where the bSleepAllowed is changed to FALSE? I am using the example and it has not been changed anywhere.
With the reed_bm on a K32W and the lped_bm on another, the program executes this function:
Of course, after the lped is attached to a parent in the network (Stack_to_APP_Handler (case OT_DEVICE_ROLE_CHILD)).
Regards,
Ricardo
Hi Ricardo,
you are absolutely right. I searched for the bSleepAllowed and only found two funktions, writing to the variable bSleepAllowed:
App_AllowDeviceToSleep() and App_DisallowDeviceToSleep().
If it set a break Point to the function, I can see that it is called and it sets the value to false. The thing i don't understand is that the thwo functions are never called anywhere in the project. So maybe the call comes from a precompiled library function.
Regards,
Micha
Hi,
Hope you are doing well. The APP_HandleLowPowerOnIdle function checks if the device can go to sleep, to enter the low power mode.
In the main_task function, the PWR_DisallowDeviceToSleep function is called, so the PWR_AllowDeviceToSleep function must be called to allow to enter sleep mode, and this function is called in the Stack_to_APP_Handler (case OT_DEVICE_ROLE_CHILD).
I have tried with reed_bm example on a K32W and the lped_bm example on another K32W, and I can get into this Low Power Mode.
Could you please check if the PWR_AllowDeviceToSleep function is called?
Best Regards,
Ricardo
Hi Ricardo,
I checked the calling of the PWR_AllowDeviceToSleep funktion. It is called as expected and the function PWR_CheckIfDeviceCanGoToSleep() is returning True. So the Problem is the bSleepAllowed flag, which is set to False. If I comment out the bSleepAllowed flag, the sleep is called.
Kind Regards
Michal