hello there i want to put my nrf51822 in sleep mode when it is not advertising. can you tell me how to do it?
hello there i want to put my nrf51822 in sleep mode when it is not advertising. can you tell me how to do it?
sorry i can't understand xxx_init function
app_trace_init(); timers_init(); buttons_leds_init(&erase_bonds); ble_stack_init(); You can see all these in main function, what you need to see is advertising_init() here.
And many MACROs like these:
#define APP_ADV_TIMEOUT_IN_SECONDS 10
Just for clarification:
__WFE(): Short for Wait For Event. Will put the CPU in system ON sleep mode. This is done in sd_app_evt_wait() function (located in power_manage() in the SDK examples). The CPU will wake up on any event.
sd_power_system_off(): Will put the CPU in system OFF sleep mode. The CPU can only wake up on gpio (which is configured in bsp_btn_ble_sleep_mode_prepare()).
See this post for and the Product Specifcation more info and for how much current is consumed in the different modes.