<?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>nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101323/nrf52810-goes-to-power-off-after-ble-diconnect</link><description>Hello, 
 I work on nRF52810 project, device is advertising on button press, when it is found by scanning device(esp32), deviceces are connected and paired. After that, when esp device is disconnected( turned off ). And on BLE_GAP_EVT_DISCONNECTED, nRF</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jul 2023 12:08:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101323/nrf52810-goes-to-power-off-after-ble-diconnect" /><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434692?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 12:08:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dab27a18-a8d0-4e92-809e-edbc328c553c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you enter debug mode and place a breakpoint on that specific function to see if it hits?&lt;/p&gt;
&lt;p&gt;If there is no other places where you enter systemoff, I find it strange that there&amp;#39;s no print.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434684?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 11:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66d17b7c-c8db-4b34-93e9-fc56cde8e8a0</guid><dc:creator>Pavlin Georgiev</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;Yes this is the only place.&lt;/p&gt;
&lt;p&gt;I call&amp;nbsp;&lt;span&gt;NRF_LOG_FINAL_FLUSH&lt;/span&gt;&lt;span&gt;() before&amp;nbsp;&amp;nbsp;entering sleep. Also I see log in normal case when there is no paired device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Pavlin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434681?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 11:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18af2c3-ffdf-4803-b943-b4ec10fcfb89</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is this the only place you call the systemoff-function?&lt;/p&gt;
&lt;p&gt;Please note: If you are using deferred logging (see sdk_config.h::NRF_LOG_DEFERRED), then you need to call&amp;nbsp;NRF_LOG_FLUSH(); before entering sleep to get the log.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434657?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 10:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1515c8f8-b2e6-4468-b8f7-d12f46446b76</guid><dc:creator>Pavlin Georgiev</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I use peer manager to store &lt;span&gt;pairing&amp;nbsp;data. And on disconnect I check with&amp;nbsp;pm_peer_count for devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it is 0 I call&amp;nbsp;&amp;nbsp;sd_power_system_off() else I start white list advertising.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But right before this calling I add log, and i do not see this log when issue appear.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Pavlin&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434631?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 08:51:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8b59dd0-70eb-4e48-aaec-4e67861bcef2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Pavlin Georgiev"]&lt;span&gt;I change&amp;nbsp;sd_power_system_off()&amp;nbsp;with&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrf_pwr_mgmt_shutdown&lt;/span&gt;&lt;span&gt;(NRF_PWR_MGMT_EVT_PREPARE_SYSOFF) for the cases when there is no paired device.&lt;/span&gt;[/quote]
&lt;p&gt;How is your logic related to going to systemoff?&lt;/p&gt;
&lt;p&gt;If you store pairing info on disconnect, then it might be a race-condition that causes the nRF to go to systemoff sometimes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434597?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 07:24:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4811cce0-e243-4704-93e8-c4052584694a</guid><dc:creator>Pavlin Georgiev</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Some additional info. I change&amp;nbsp;sd_power_system_off()&amp;nbsp;with&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrf_pwr_mgmt_shutdown&lt;/span&gt;&lt;span&gt;(NRF_PWR_MGMT_EVT_PREPARE_SYSOFF) for the cases when there is no paired device. So naw in this case I see logs from&amp;nbsp;shutdown_handler, but I still do not see logs when issue appears.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/434525?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 16:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23c36c50-5065-42fd-8c0e-802ddc9f4358</guid><dc:creator>Pavlin Georgiev</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I added this code in my project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static bool m_shutdown_handler(nrf_pwr_mgmt_evt_t event)
{
    NRF_LOG_INFO(&amp;quot;m_shutdown_handler: %d&amp;quot;, event);

    return true;
}

NRF_PWR_MGMT_HANDLER_REGISTER(m_shutdown_handler, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But I do not see any logs when issue occurs. I also do not see logs when&amp;nbsp;sd_power_system_off() is called(I use this function to put system in sleep mode when there is no know(paired) device).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pawlin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/433932?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 12:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4b8d298-0058-4c69-be0d-e540d29fea1c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some examples uses the button handler to go to systemoff.&lt;/p&gt;
&lt;p&gt;Before the nrf_pwr_mgmt module should go to systemoff (if that is requested), it should give a callback through the applications registered &amp;quot;shutdown_handler&amp;quot; if that is registered within your application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you enter debug mode and see if there&amp;#39;s any calls that ends up in the function &amp;quot;nrf_pwr_mgmt_shutdown&amp;quot;?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/433694?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 12:51:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:797650f9-a58d-4e25-b19c-c1cc12c00382</guid><dc:creator>Pavlin Georgiev</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank You for fast response!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Q1: Yes. I check this with Nordic Power Pofiler Kit ||. I see that consumption go around&amp;nbsp; 0,38uA.&lt;/p&gt;
&lt;p&gt;Q2: In code I use only&amp;nbsp;nrf_pwr_mgmt_init() and&amp;nbsp;nrf_pwr_mgmt_run().&lt;/p&gt;
&lt;p&gt;Q3: No I have not. I use only RTT log debugging, and from logs i do not see where&amp;nbsp;&lt;span&gt;the code ends up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pavlin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52810 goes to power off after BLE diconnect.</title><link>https://devzone.nordicsemi.com/thread/433665?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 11:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91e9b6e2-98ed-4711-a66b-befa8b863dfe</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q1: Have you checked the power consumption to ensure that the nRF goes into power off state?&lt;/p&gt;
&lt;p&gt;Q2: Is your application using nrf_pwr_mgmt API? If yes, is there any calls to &amp;quot; nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);&amp;quot; anywhere in your code?&lt;/p&gt;
&lt;p&gt;Q3: Have you checked where the code ends up when this happens? This can be done by attaching a debugger.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>