Hello,
I am using Eclips & ARM tool chain for project with BLE functionality. I tried to import this code in Segger embedded IDE but it did not worked. This project is old one need to make it work. Code works perfectly except for sleep mode. Below function was called in the while loop. While testing found that sudden surge in current after 3 min. When, I did not include I2C and SPI peripherals in my code sleep mode takes nearly 100uA but when I include the operation of I2C and SPI devices, it takes approximate 1.2mA current.
I am new to BLE so I might missing something while working on the sleep mode operation. Please suggest me how to configure the sleep mode in Eclipse ? So that I can cross check my code with that steps. I am using softdevice 5.0.0. I had worked on Segger but not in eclipse IDE.. Is there any configuration need to do in sdk_config.h ?
Thanks
void power_manage(void)
{
/* Clear exceptions and PendingIRQ from the FPU unit */
__set_FPSCR(__get_FPSCR() & ~(FPU_EXCEPTION_MASK));
(void) __get_FPSCR();
NVIC_ClearPendingIRQ(FPU_IRQn);
NRF_LOG_FLUSH();
ret_code_t err_code = sd_app_evt_wait();
// APP_ERROR_CHECK(err_code);
if(err_code != NRF_SUCCESS)
{
write_uart_data((unsigned char *)("\n Error sd_app_evt_wait"),0);
}
else
{
//write_uart_data((unsigned char *)("\n Success sd_app_evt_wait"),0);
}
}