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

ppk Current measurement problem

I set sd_app_evt_wait in vPortSuppressTicksAndSleep and got the average current. is 0.7ma, Using Other tool measurement, this demo will suddenly increase to a few dozen mA after running for a few seconds. I don't know what the problem is?
The code is as follows:
Thank you all

if ( xModifiableIdleTime > 0 )
{
#ifdef SOFTDEVICE_PRESENT
/* With SD there is no problem with possibility of interrupt lost.
* every interrupt is counted and the counter is processed inside
* sd_app_evt_wait function. */
portENABLE_INTERRUPTS();
sd_app_evt_wait();
#else
/* No SD - we would just block interrupts globally.
* BASEPRI cannot be used for that because it would prevent WFE from wake up.
*/
__disable_irq();
portENABLE_INTERRUPTS();
do{
__WFE();
} while (0 == (NVIC->ISPR[0] | NVIC->ISPR[1]));
__enable_irq();
#endif
}

Parents Reply Children
No Data
Related