Hi Sir,
I have configured a hibernation sleep after scanning, i can able to achieve 26.2uA after Powering down the SPI flash, How to reduce the current consumption further.
I have attached the code below
static void ble_scan_for_devices(){ ke_state_set(TASK_APP, APP_CONNECTABLE); ble_gap_error_t err = user_ble_gap_start_scan(true, SCAN_INTVL_MS, SCAN_WINDOW_MS, false); dbg_block_printf("Started Scanning!!!!!!!!!!!!!!!!!!!\r\n", NULL); ASSERT_ERROR(err == BLE_GAP_ERROR_NO_ERROR); //app_easy_timer(200, scan_stop); scan_timer=app_easy_timer(200, scan_stop);}
void scan_stop(){ user_ble_gap_stop_scan(); dbg_block_printf("Stopped Scanning!!!!!!!!!!!!!!!!!!!\r\n", NULL); // dbg_block_printf("Timer state before cancel: %d\r\n", scan_timer); ++timer; SetBits16(PMU_CTRL_REG, TIM_SLEEP, 1); // Wait until PD_TIM is closed while ((GetWord16(SYS_STAT_REG) & TIM_IS_DOWN) != TIM_IS_DOWN); // Power down the flash to reduce current consumption during Hibernation spi_flash_power_down(); // spi_flash_ultra_deep_power_down(); //Enter Hibernation4 //time_result =++timer; arch_set_hibernation(HIB_WAKE_UP_PIN_MASK, PD_SYS_DOWN_RAM_OFF, PD_SYS_DOWN_RAM_OFF, PD_SYS_DOWN_RAM_OFF, REMAP_ADDR0_TO_ROM, false); }