Xavier Vilajosana

QN908x enable low power in qn908xcdk_wireless_examples_bluetooth_temperature_sensor

Discussion created by Xavier Vilajosana on Oct 31, 2017
Latest reply on Feb 15, 2018 by Xavier Vilajosana

Hi,

 

I am trying to enable the low power operation in the demo application 

qn908xcdk_wireless_examples_bluetooth_temperature_sensor

 

To do so I inject as a symbol 

cQN_UsePowerDownMode 1 

 

I can also set it to 1 in the app_preinclude.h 

 

I recompile and flash the applicaiton and I expect that the application starts and I can see it in deep sleep when measuring the energy consumption. 

When looking at the traces I cannot see the expected 0.7uA in deep sleep or 2,3uA in power down 0 mode but I see 700uA which correspond to the idle state. I tried to understand the code but there is a complete lack of documentation: 

 

The power_manger.h file enables us to set the sleep mode in an array through the function 

PM_SetReq(power_mode_t pm, uint32_t bits)

 

I see this functions being called and the values set in the array.

 

then the idle task calls 

static void App_Idle(void)
{
PM_PowerManagement();
}

and I cannot follow anymore as I do not know where the PM_PowerManagement(); code is implemented. 

 

could you please advice me on how to understand this code? does it actually work? Do I need to configure something else?

 

How the PM_PowerManagement() function access the sleep mode defined by the function

PM_SetReq(power_mode_t pm, uint32_t bits)?

 

thanks and regards,
Xavi

Outcomes