Hello All,
I am working on nRF51822 using IAR IDE and nRF51 SDK 12.3.0.
Right now I am checking power consumption of device in ideal mode but right now it is higher.
I uploaded example of pwr given in peripheral folder and it works.
path: ..\..\sdk_12_3_0\nRF5_SDK_12.3.0_d7731ad\examples\peripheral\pwr_mgmt
So i think using nrf_pwr_mgmt library I got low power consumption so I have implemented initialization of power management in my application as shown below.
int main()
{
.
.
ret_code_t ret_code = nrf_pwr_mgmt_init(APP_TIMER_TICKS(1000, APP_TIMER_PRESCALER));
APP_ERROR_CHECK(ret_code);
.
.
for (;;)
{
if (NRF_LOG_PROCESS() == false)
{
nrf_pwr_mgmt_run();
}
}
Then upload program in my device but it not works.
in nrf_pwr_mgmt_run() this function SOFTDEVICE_PRESENT is not define. But in this function
#ifdef SOFTDEVICE_PRESENT
ret_code_t ret_code = sd_app_evt_wait();
if (ret_code == NRF_ERROR_SOFTDEVICE_NOT_ENABLED)
{
__WFE();
__SEV();
__WFE();
}
else
{
APP_ERROR_CHECK(ret_code);
}
#else
__WFE();
__SEV();
__WFE();
#endif // SOFTDEVICE_PRESENT
this portion is not execute.
so please give me suggestion.
Thanks & regards,
Urvisha Andani