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

Zephyr/NCS - gpio_pin_interrupt_configure causes ~15ua increase in consumption

As instructed to post here by  

We're using Zephyr on at least 4 of our products and have thousands of boards with NRF chips in the pipeline; we're trying to get the consumption down as much as we can on our project, but we noticed that the code for enabling an interrupt on a button is bringing our consumption up.

After adapting the latest NCS Zephyr sample of the "basic/button", I can see that the use of gpio_pin_interrupt_configure causes a 15ua increase in consumption. I have attached the project here so you should be able to build it and reproduce it yourself. I have added a few things to get the consumption down as much as I can to the sample so that there is no noise when focusing on the consumption changes after the function call is made.
You will notice that when this line is commented out (you may have to comment the rest out before the while loop too as it's dependent), the consumption goes down to ~3ua, but when it's left in, the consumption sits at around ~15ua. I have tried this on Zephyr 2.3.0 and 2.3.99 (latest) and seen the same results on both

button_sample.tar.gz

Related