<?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>Number of PWR MGMT handlers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67913/number-of-pwr-mgmt-handlers</link><description>Is there a limit to the number of handlers that can be registered using NRF_PWR_MGMT_HANDLER_REGISTER? I can&amp;#39;t seem to get any more than 3 to be called, changing NRF_PWR_MGMT_CONFIG_HANDLER_PRIORITY_COUNT doesnt seem to help either I&amp;#39;m using sdk 16,0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Nov 2020 13:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67913/number-of-pwr-mgmt-handlers" /><item><title>RE: Number of PWR MGMT handlers</title><link>https://devzone.nordicsemi.com/thread/278270?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 13:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee574135-4fc2-4ac4-bfa1-9babc61fe939</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="goldwake"]my watch dog is waking my system up after&amp;nbsp; NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF. This doesn&amp;#39;t seem like desired behaviour[/quote]
&lt;p&gt;Have you reset the chip after programming, to make sure it does not enter &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/power.html#unique_142049681"&gt;emulated System OFF mode&lt;/a&gt;? If the chip successfully enters System OFF mode, it should not be waken up by the Watchdog.&lt;/p&gt;
[quote user="goldwake"]Another issue i found is that i can call nrf_pwr_mgmt_shutdown( NRF_PWR_MGMT_SHUTDOWN_CONTINUE) without issues, even if a shutdown hasnt been started with one of the other members of nrf_pwr_mgmt_shutdown_t[/quote]
&lt;p&gt;It looks like this is the intended behavior, the function checks if the procedure is started first:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Check if shutdown procedure is not started.
if (!nrf_mtx_trylock(&amp;amp;m_sysoff_mtx))
{
    return;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The function does not have a return code, so it will not be able to report an error. You should make sure that the logic in your application does not depend on this function unless the shutdown procedure is started.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Number of PWR MGMT handlers</title><link>https://devzone.nordicsemi.com/thread/278190?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 07:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3373a747-e7a4-4f7d-95f0-17eaa751339e</guid><dc:creator>goldwake</dc:creator><description>&lt;p&gt;ok I made some dumb logic errors prevent this from working properly. It&amp;#39;s fixed now but I noticed a couple of things while investigating:&lt;br /&gt;&lt;br /&gt;my watch dog is waking my system up after&amp;nbsp; NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF. This doesn&amp;#39;t seem like desired behaviour&lt;br /&gt;&lt;br /&gt;Another issue i found is that i can call nrf_pwr_mgmt_shutdown( NRF_PWR_MGMT_SHUTDOWN_CONTINUE) without issues, even if a shutdown hasnt been started with one of the other members of nrf_pwr_mgmt_shutdown_t&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>