Spikes in current consumption after using semaphores





can anyone tell me what are these spikes

i am some part of my code:

_SPRINTLN(DEBUG_INFO, "LOW-PWR-SYS-ON"); // debug log to show device will enter standby state

        // turn off peripherals
        pm_device_action_run(uart_dev, PM_DEVICE_ACTION_SUSPEND);
        pm_device_action_run(adc_dev, PM_DEVICE_ACTION_SUSPEND);

        // Block (sleep) the main thread, it will wake up on GPIO interrupt or timer timeout
        k_sem_take(&main_sem, K_FOREVER);

        pm_device_action_run(uart_dev, PM_DEVICE_ACTION_RESUME);
        pm_device_action_run(adc_dev, PM_DEVICE_ACTION_RESUME);

  • Hello,

    As far as I can tell, you have the same spikes in the first and second screenshot, but that is perhaps what you intended? 

    I need a bit more context. Perhaps you can upload the application you used in your measurements?

    It is an event happening every 4 seconds, so perhaps some timer waking up the CPU every 4 seconds?

    Best regards,

    Edvin

Related