<?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>Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50856/inability-to-sleep-the-nrf52832-number-of-possible-buttons-in-using-the-bsp-module</link><description>Hi, 
 We have a custom device that has 15 buttons. Presently we use the following code to initialize and use the button interrupts. I am using a __WFE(); to wait for the next event (i.e. a button press) however when I press two specific buttons (by design</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Aug 2019 13:02:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50856/inability-to-sleep-the-nrf52832-number-of-possible-buttons-in-using-the-bsp-module" /><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/207157?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 13:02:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0c8cb50-6ea8-4171-9c1e-f219aeca8263</guid><dc:creator>BendaEng</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To answer your question, no I do not. However, basically what my equipment is telling me is the presence or absence of sleep (if 5 mA = ON, if 0mA = OFF, not taking into account any sort of accuracy).&lt;/p&gt;
&lt;p&gt;On a different note, I have now been able to sleep my device. The following was the changes that I made to make the device sleep. Basically, I didn&amp;#39;t let all of the 15 pins be a wakeup. Only two of them. I could never identify it, but I think one of those other pins (that are now not enabled for wakeup), was causing the wake-up. Maybe someone can shed light on this, but the pin cnf registers all seemed fine. Part of the issue could have been that my shutdown was contained in the input pin handler. Now it&amp;#39;s in a separate function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyway here&amp;#39;s my changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OLD Non-Working&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
*
* The following contain the interrupt handlers for all button presses
*
*/
void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
   buttons_pressed = true;
   chirp_led(BLUE_LED);

   ret_code_t err_code; 
   
   if(power_off_mode)
      {
              
            //Disable power-down button to prevent System-off wakeup
                      
            for(int i = 0; i &amp;lt; NUM_BUTTONS; i++) {
                    
                    nrf_drv_gpiote_in_uninit(buttons[i]);
                    nrf_drv_gpiote_in_event_disable(buttons[i]);      
            }

            //Configure wake-up button
           
            for(int i = 0; i &amp;lt; NUM_BUTTONS; i++) {
                nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);    //Configure to generate interrupt and wakeup on pin signal high.
                in_config.pull = NRF_GPIO_PIN_PULLDOWN;                                         //Configure pulldown for input pin to prevent it from floating.
                err_code = nrf_drv_gpiote_in_init(buttons[i], &amp;amp;in_config, in_pin_handler);      //Initialize the wake-up pin
                APP_ERROR_CHECK(err_code);                                                      //Check error code returned
                nrf_drv_gpiote_in_event_enable(buttons[i], true);                               //Enable event and interrupt for the wakeup pin
            }
          
          //Enter System-off
          NRF_POWER-&amp;gt;SYSTEMOFF = 1;
      }
}
&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NEW Working Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void device_power_off(void)
{
  ret_code_t err_code = 0; 

 if(power_off_mode)
      {
              
            for(int i = 0; i &amp;lt; 5; i++)
            {
              chirp_led(RED_LED);
              nrf_delay_ms(100);
            }
            
            //Disable power-down button to prevent System-off wakeup
                      
            for(int i = 0; i &amp;lt; NUM_BUTTONS; i++) {
                    
                    nrf_drv_gpiote_in_uninit(buttons[i]);
                    nrf_drv_gpiote_in_event_disable(buttons[i]);      
            }

            //Configure wake-up button
           
           /*
            for(int i = 0; i &amp;lt; NUM_BUTTONS; i++) {
                nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);    //Configure to generate interrupt and wakeup on pin signal high.
                in_config.pull = NRF_GPIO_PIN_PULLDOWN;                                         //Configure pulldown for input pin to prevent it from floating.
                err_code = nrf_drv_gpiote_in_init(buttons[i], &amp;amp;in_config, in_pin_handler);      //Initialize the wake-up pin
                APP_ERROR_CHECK(err_code);                                                      //Check error code returned
                nrf_drv_gpiote_in_event_enable(buttons[i], true);                               //Enable event and interrupt for the wakeup pin
            }
            */

            nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);    //Configure to generate interrupt and wakeup on pin signal high.
            in_config.pull = NRF_GPIO_PIN_PULLDOWN;                                         //Configure pulldown for input pin to prevent it from floating.
            err_code = nrf_drv_gpiote_in_init(buttons[14], &amp;amp;in_config, in_pin_handler);      //Initialize the wake-up pin on FCN Button
            APP_ERROR_CHECK(err_code);                                                      //Check error code returned
            nrf_drv_gpiote_in_event_enable(buttons[14], true);                               //Enable event and interrupt for the FCN Button Wakeup Pin
            
            err_code = nrf_drv_gpiote_in_init(buttons[12], &amp;amp;in_config, in_pin_handler);      //Initialize the wake-up pin on BT Button
            APP_ERROR_CHECK(err_code);                                                      //Check error code returned
            nrf_drv_gpiote_in_event_enable(buttons[12], true);                               //Enable event and interrupt for the BT Button wakeup pin
          
          //Enter System-off
          power_off_mode = false;

          NRF_POWER -&amp;gt; SYSTEMOFF = 1; 

          //sd_power_system_off();     
      }


}&lt;/pre&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the suggestions to get me here @Jared. Much appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/206333?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 11:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:418d4868-122d-4ebe-adfc-6743cd34aefd</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The boot loader shouldn&amp;#39;t have any effect on keeping the pins on as it will jump directly to the app if it&amp;#39;s valid. It seems from the documentation that the TinkerForge does not have a high enough resolution to measure the sleep current, as the current during sleep is in µA:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;From description of features:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;quot;1mW, 1mV, 1mA resolution over the whole range&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do you have any other available device that can measure at µA range with a high enough resolution?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/206098?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2019 12:04:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d08d02e6-60ba-4309-a2b9-d5347af065a3</guid><dc:creator>BendaEng</dc:creator><description>&lt;p&gt;Hi Jared,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for getting back to me. Ok, so if I&amp;#39;m understanding correctly my pins are setup properly?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I regards to the debug mode emulating sleep, I have power cycled my device with the same results returning upon power up. I am using a BL652 DK, which is not the same as the Nordic, but I program and debug externally on a custom board in the following way (I believe no different than the Nordic DK). To answer your follow-up question, no I am not using a power profiler kit, rather a Tinkerforge Voltage/Current Bricklet. My custom device is powered with a battery and measured through this current shunt in-line with the power connection.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power Measurement Setup" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/PowerMeasurement.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;Upon disconnecting my SWDIO and SWCLK from the custom board and power cycling my device after programming it I am using my enter sleep mode through button press. This consistently results in 5mA of draw.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my previous reply I asked about the bootloader (as my application has a Buttonless DFU integration for OTA upgrading the firmware). Does the bootloader have any effect on forcing the I/O to remain on? I.e. the SWDIO and SWCLK or other peripheral? If so, what is the recommended bootloader for a Buttonless DFU application to retain low power capabilities?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/205321?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 12:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:254495a9-34be-4c23-8a1d-4a2f51924826</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No, only unused pins should be set as input with buffer disconnected.&amp;nbsp;&lt;/p&gt;
[quote user="BendaEng"]I&amp;#39;ve read that in debug mode the device will not be able to properly sleep. I built in release mode, disconnected my debugger, and measured the power consumption during &amp;quot;normal operation&amp;quot;. [/quote]
&lt;p&gt;Yes, if the nRF is in debug mode then it will not go into system OFF but emulate it, which will not give a current consumption similar to the what is expected in sleep. A complete power cycle should set the nRF to normal mode. Do you have a DK available? Could you try using the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52832_dk/UG/nrf52_DK/hw_debug_out.html?cp=3_1_4_5_9"&gt;external debugger on the DK and program the custom board&lt;/a&gt; with the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_pwr_mgmt.html?cp=5_1_4_2_2_20"&gt;Power Profiling Application&lt;/a&gt;&amp;nbsp;from the SDK? What is the current consumption that you&amp;#39;re measuring? The result from this would highlight what causes this issue, i.e a problem with the design of the custom board or the application that you&amp;#39;re using.&amp;nbsp; Could you also describe how you measure the current consumption? Are you using the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_ppk/UG/ppk/PPK_user_guide_Intro.html?cp=6_6"&gt;power profiler kit&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;The application also shows how to implement sleep mode properly with BLE.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/204595?ContentTypeID=1</link><pubDate>Sun, 18 Aug 2019 03:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb48d49-00e5-4340-b054-27bda6b34924</guid><dc:creator>BendaEng</dc:creator><description>&lt;p&gt;Hi Jared,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve stepped through the program and it does call the sleep function. I also tried terminating the connection before going to sleep with the following, but it would hardfault on me everytime I called the sleep function. Is there another way to do this or am I calling this correctly from the peripheral side?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if(sleep_pressed)
    {
        sleep_sensor();
        NRF_LOG_INFO(&amp;quot;Sleep\n&amp;quot;);
        
        err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

        sleep_pressed = false;
        power_off_mode = true;

        power_off();
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So I looked through the PIN_CNF registers for all GPIO. I got back the following (annotated with each pins use). I believe I&amp;#39;ve interpreted the registers correctly. All unused pins are set to input with disconnected input buffers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Pin 0 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin 
Pin 1 (mosfet) = 0x00000003  : 3 = Configured as output pin, disconnected input buffer
Pin 2 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 3 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 4 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 5 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 6 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 7 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 8 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 9 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 10 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 11 (led) = 0x00000003  : 3 = Configured as output pin, disconnected input buffer
Pin 12 (led) = 0x00000003  : 3 = Configured as output pin, disconnected input buffer
Pin 13 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 14 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 15 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 16 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 17 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 18 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 19 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 20 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 21 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 22 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 23 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 24 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 25 (unused) = 0x00000002  : 2 = Configured as input pin, disconnected input buffer
Pin 26 (SDA) = 0x0000060c  : 6 = Standard &amp;#39;0&amp;#39;. disconnect &amp;#39;1&amp;#39; (normally used for wired-and connections), c = pullup on pin
Pin 27 (SCL) = 0x0000060c  : 6 = Standard &amp;#39;0&amp;#39;. disconnect &amp;#39;1&amp;#39; (normally used for wired-and connections), c = pullup on pin
Pin 28 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 29 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 30 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin
Pin 31 (button) = 0x00020004  : 2 = RW SENSE for high level, 4 = RW Pulldown on Pin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Does each pin &amp;#39;have&amp;#39; to be set as input with input buffer disconnected? If so how can an interrupt on pin state change be used to wake the device back up?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another thought I had was the bootloader holding SWDIO and SWDCLK lines on. The reason I say this is because currently I am using the attached debug bootloader. I&amp;#39;ve read that in debug mode the device will not be able to properly sleep. I built in release mode, disconnected my debugger, and measured the power consumption during &amp;quot;normal operation&amp;quot;. The 5 mA still is the lowest I can get it. Could this debug bootloader cause backend peripherals to not be allowed to shut down? If so where can I find a bootloader (with DFU functionality) that wouldn&amp;#39;t have those characteristics?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf52832_5F00_xxaa_5F00_s132_5F00_bootloader_5F00_with_5F00_settings_5F00_Debug.hex"&gt;devzone.nordicsemi.com/.../nrf52832_5F00_xxaa_5F00_s132_5F00_bootloader_5F00_with_5F00_settings_5F00_Debug.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/204114?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2019 13:56:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:696ba8ab-b43b-4593-bca4-6ba6de83578e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="BendaEng"]Additionally I tried to use an idle_state_handler(); which calls&amp;nbsp;nrf_pwr_mgmt_run(); to set the device into System ON mode (to preserve the state of the machine better). This eliminates the resetting on wake-up button pressing, but&amp;nbsp;again it doesn&amp;#39;t seem like the device even enters a lower power mode (just turns off our I2C device).&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you step through the code and verify if the nRF actually calls the sleep function? Ble events might be waking the application from sleep, I suggest that you try terminating the connection before going to sleep. I&amp;#39;m suspecting that the high current consumption might be due floating pins. Could you read the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpio.html?cp=3_1_0_19_2_9#register.PIN_CNF-0"&gt;PIN_CNF&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;register and see that all pins are set as input with input buffer disconnected. This would prevent any pins from floating and therefore raising the current consumption during sleep.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/203694?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 21:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a10cd82-78f5-40d1-a0c3-f348855809f4</guid><dc:creator>BendaEng</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just an update. I tried removing the Watch Dog completely. The problem of not entering the sleep mode is not due to the Watch Dog as I got no different results by doing so.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another thing to mention. At the point I am trying to sleep the device (peripheral) it is connected to a central device. Do I need to terminate the connection or do any house-keeping before calling the sleep function, or should that happen automatically with the methods I&amp;#39;ve tried?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/203692?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 21:09:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2afe1f9-04b0-4d5c-829f-93b807f42d14</guid><dc:creator>BendaEng</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the suggestions. I am not presently using the button handling library, I&amp;#39;ve defined a buttons.h file and have initialized them as&amp;nbsp;GPIOTE_CONFIG_IN_SENSE_LOTOHI as shown above. I may want to use it though as I still cannot identify the root issue of the high power.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked into the RESETREAS register before and after applying the power settings. The value never changes from 0x00000006 indicating the following.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.&amp;nbsp;&lt;span&gt;Reset from watchdog detected&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2. &lt;span&gt;Reset from soft reset detected&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am using a watchdog, but based on the value never changing and the fact that our current draw reduces to only 5 mA (from 9mA by putting our I2C device into sleep mode) it still seems like the device never actually enters a lower power mode. Could the Watch Dog be preventing entry into the sleep mode? Or what else could prevent this?&lt;/p&gt;
&lt;p&gt;Additionally I tried to use an idle_state_handler(); which calls&amp;nbsp;nrf_pwr_mgmt_run(); to set the device into System ON mode (to preserve the state of the machine better). This eliminates the resetting on wake-up button pressing, but&amp;nbsp;again it doesn&amp;#39;t seem like the device even enters a lower power mode (just turns off our I2C device).&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for handling the idle state (main loop).
 *
 * @details If there is no pending log operation, then sleep until next the next event occurs.
 */
static void idle_state_handle(void)
{
    if (NRF_LOG_PROCESS() == false)
    {
        nrf_pwr_mgmt_run();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So I&amp;#39;m gathering If I define a custom_board.h file the only limitation on number of inputs to track and use with BSP is the number of I/O the device has? Is that correct that I can define 15 or more buttons this way? I may have to try this route of detecting button presses if I cannot get the power draw lower since it seems like the power management is more defined and functional with it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inability to sleep the nRF52832. Number of possible buttons in using the BSP module?</title><link>https://devzone.nordicsemi.com/thread/203623?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 13:54:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4eecc14e-3628-488c-99e1-76fb875ce9dd</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=3_1_0_17_1#unique_1707892264"&gt;prouduct specification &lt;/a&gt;states:&amp;quot;&lt;em&gt;When the system wakes up from System OFF mode, it gets reset. For more details, see&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#unique_832471788"&gt;Reset behavior&lt;/a&gt;&amp;quot;.&amp;nbsp;&lt;/em&gt;You could check the reason for the reset by reading r&lt;span&gt;egister&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#register.RESETREAS"&gt;RESETREAS&lt;/a&gt;. Are you using the button handling library? The library handles debouncing which could otherwise cause a pin reset. You should use a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/sdk_for_custom_boards.html?cp=5_1_1_5_2#custom_board_support"&gt;custom board file&lt;/a&gt; if you&amp;#39;re using a custom board with the BSP module.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>