This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_app_uart low power

Hi,

I am developing a product with battery power. To preserve the battery life, this product needs to work in low power mode.

My Environment is a nRF52832, SDK15.2 & custom board

I use ble_app_uart example

Current consumption is 5mA .


Please advise me to enter low power mode.

==========================================================

#define APP_ADV_INTERVAL 64 /**< The advertising interval (in units of 0.625 ms; this value corresponds to 40 ms). */

#define APP_ADV_DURATION                0   /**< The advertising time-out (in units of seconds). When set to 0, we will never time out. */

 init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

int main(void)
{
    bool erase_bonds;
	ret_code_t err_code;
	
    // Initialize.
 //    uart_init();
//	gpio_led_init();	
    log_init();
    timers_init();
	app_timers_init();	

    power_management_init();

    ble_stack_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
	
	err_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
	APP_ERROR_CHECK(err_code);
	
    // Start execution.
    NRF_LOG_INFO("Debug logging for UART over RTT started.");
    advertising_start();

	app_timers_start();

    // Enter main loop.
    for (;;)
    {
        idle_state_handle();
    }
}

 

In SDK_CONFIG.h

#define NRF_LOG_ENABLED 0

#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 5

Thanks.

Regards.

Alex

Related