<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119853/power-consumptio-when-a-button-is-constant-pushed</link><description>Dear sir/madam 
 
 Background: 
 We have developed a remote-control system where we use nRF52840 and SDK 17.1.0 
 VDD is 3,0 V 
 We also use the library “app_button” where “button_high_accuracy” is disabled. 
 We have defined 6 buttons and use external</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Mar 2025 13:05:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119853/power-consumptio-when-a-button-is-constant-pushed" /><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527844?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 13:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ba1329d-a0a7-4bd7-8684-9e8f89aad952</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;When the button is pressed, an interrupt is generated and call the handler. &amp;nbsp;That is where the addition consumptions are from. &amp;nbsp;The more time the button is pressed, the more power consumption it will be.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527783?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 08:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eea20d5e-4d9c-4ee0-bc93-8f7f56caa18f</guid><dc:creator>Svein</dc:creator><description>&lt;p&gt;Hi Nguyen,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for a quick respons.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Question:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is the button_app module designed so that interrupts are generated all the time or does the app_button module perform constant scanning of GPIO pins if a button (GPIO) is constantly active? If so, I assume that the module only sends a call to the application when the button status changes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Svein&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527759?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 07:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:415d602e-d045-49c3-b0b7-1652bc256598</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;You can export the power profiler trace as a .ppk2 file here so that we can review it. Uploads to DevZone can be done with the &lt;strong&gt;Insert&lt;/strong&gt; button, then choose &lt;strong&gt;Image/Video/File&lt;/strong&gt;, then you can upload a file from there. A good point is being made here that if the button is pressed, the button interrupt is constantly being responded to as well, keeping the device in a running state most likely.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1742283401491v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527741?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 02:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53b8e516-ae2e-42b5-93ce-e07631b9aa6e</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;It is normal that the power consumption is higher 23uA. &amp;nbsp;MCU is constantly responding to the button interrupt. Meaning the MCU is not sleeping but running at 100%.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527732?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 21:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:036e9567-6a58-4702-ae7c-43ca8b4fc714</guid><dc:creator>Svein</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;I use the app_button module to configure the buttons by calling app_button_init.&lt;/p&gt;
&lt;p&gt;Power measurement is done by using PPK2&lt;/p&gt;
&lt;p&gt;Here is the configuration: &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;static void buttons_init(void)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; uint32_t err_code;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; static app_button_cfg_t buttons[] =&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {DM_BUTTON, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {FUNC_BUTTON1, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler},&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {EM_BUTTON, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler},&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {RU_IN_CHARGER, APP_BUTTON_ACTIVE_HIGH, NRF_GPIO_PIN_NOPULL, button_event_handler}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {FUNC_BUTTON2, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler},&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {FUNC_BUTTON3, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler}, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; {FUNC_BUTTON4, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, button_event_handler} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; };&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; err_code = app_button_init(buttons, ARRAY_SIZE(buttons), BUTTON_DETECTION_DELAY);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;err_code = app_button_enable();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Button names and assosiated GPIO&lt;/em&gt;&lt;br /&gt;&lt;em&gt;DM_BUTTON&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.22&lt;/em&gt;&lt;br /&gt;&lt;em&gt;FUNC_BUTTON1&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.20&lt;/em&gt;&lt;br /&gt;&lt;em&gt;EM_BUTTON&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; P0.22&lt;/em&gt;&lt;br /&gt;&lt;em&gt;FUNC_BUTTON1&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.19&lt;/em&gt;&lt;br /&gt;&lt;em&gt;RU_IN_CHARGER&amp;nbsp; &amp;nbsp;=&amp;gt; P0.04&lt;/em&gt;&lt;br /&gt;&lt;em&gt;FUNC_BUTTON2&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.21&lt;/em&gt;&lt;br /&gt;&lt;em&gt;FUNC_BUTTON3&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.23&lt;/em&gt;&lt;br /&gt;&lt;em&gt;FUNC_BUTTON4&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; P0.24&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to upload a picture of the measurement done by PPK2?&lt;/p&gt;
&lt;p&gt;When looking at PPK2 there are pulses when a button is pushed, and kept pushed.&lt;br /&gt;Time distance from top to top is 980 &amp;micro;S and the amplitude is 2,5mA +/- some hundred &amp;micro;A&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Svein&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumptio when a button is constant pushed</title><link>https://devzone.nordicsemi.com/thread/527668?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 14:02:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ebe5a8a-d694-4bf5-aec4-1f8dad25a449</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you share some details on what GPIO you&amp;#39;re pressing here exactly, and what this button is configured as exactly. It might be that it wakes one of the clocks/oscillators, that would indeed increase the current consumption by quite a bit. Also, how do you measure power consumption here exactly, are you using a &lt;a href="https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2"&gt;PPK2&lt;/a&gt;, a dedicated power analyzer, or some other method?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>