<?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>POFWARN</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57622/pofwarn</link><description>Hi, 
 I&amp;#39;m working on the nrf52832 development board and SDK 16.0. I want to use the Power supply supervisory functionality to detect any type of power failure. 
 I&amp;#39;m using ble Blinky example with softdevice s132 to test this. 
 I just want to know, How</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Feb 2020 08:46:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57622/pofwarn" /><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/237057?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 08:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5a6ab4c-40a2-4dd0-b394-a286baff72af</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="Hassam Arshad"]&lt;p&gt;&lt;/p&gt;&lt;p&gt;This worked!&lt;/p&gt;&lt;p&gt;Thanks for your kind feedback it really helped a lot.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Happy to hear that can help. Please kindly verify the question to benefit other users. Thanks.&amp;nbsp;&lt;/p&gt;
[quote user="Hassam Arshad"]I just wanted to know that if there is any register in NVM where any warning stores&amp;nbsp;so that we can check whether there is any undesirable reset happened or not?[/quote]
&lt;p&gt;&lt;span&gt;You could check the NRF_POWER-&amp;gt;RESETREAS register&amp;nbsp;by the&amp;nbsp;&lt;a title="sd_power_reset_reason_get" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_5_3_1_2_7_2_25#gab039839654af96fbcb810b68f4665242"&gt;sd_power_reset_reason_get&lt;/a&gt;() in order to detect what caused your reset.&amp;nbsp;&lt;/span&gt;&lt;span&gt;This&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/7208/brown-out-or-power-on-failure-detection-in-low-voltage-mode-setup-supply-is-1-8v/25466#25466"&gt;post&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/48446/how-to-detect-cause-of-reset/192091#192091"&gt;this&amp;nbsp;&lt;/a&gt;might help you.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="Hassam Arshad"]As&amp;nbsp;NRF_EVT_POWER_FAILURE_WARNING is the only event I know that is happening while on low power and reset. but how we will identify after reset that it was due to low voltage?[/quote]
&lt;p&gt;&lt;span&gt;This&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/7208/brown-out-or-power-on-failure-detection-in-low-voltage-mode-setup-supply-is-1-8v/25466#25466"&gt;post&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/48446/how-to-detect-cause-of-reset/192091#192091"&gt;this&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;might help you.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you have further questions, please create a new support case. The new question now is far away from the original issue.&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/236782?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 10:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63121614-026a-4f3d-98de-ce07a07870d4</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This worked!&lt;/p&gt;
&lt;p&gt;Thanks for your kind feedback it really helped a lot.&lt;/p&gt;
&lt;p&gt;I just wanted to know that if there is any register in NVM where any warning stores&amp;nbsp;so that we can check whether there is any undesirable reset happened or not?&lt;/p&gt;
&lt;p&gt;As&amp;nbsp;NRF_EVT_POWER_FAILURE_WARNING is the only event I know that is happening while on low power and reset. but how we will identify after reset that it was due to low voltage?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/236733?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 09:07:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10734b4a-a0df-4b27-b162-84cec541e2fe</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please add &amp;quot;void * p_context&amp;quot; to the input argument of &lt;em&gt;sys_evt_dispatch&lt;/em&gt; declaration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;static void &lt;span&gt;sys_evt_dispatch&lt;/span&gt;(uint32_t evt_id, void * p_context)&lt;/p&gt;
&lt;p&gt;Please kindly let me know this can help or not. Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/236535?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 12:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82ea6f7d-64ec-4c4d-bed7-5be2377c580c</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;Actually got my code working after performing the above steps. Now just there&amp;#39;s one warning that is kept coming on the compilation. Can you suggest about it?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1582720776460v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/235441?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2020 12:19:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faabe9f2-2fb6-41d1-aefe-e1bcf7496e82</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please check the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrf__sdh__soc__config.html#ga7168adece68c9b5a1a426174c0b06235"&gt;NRF_SDH_SOC_ENABLED&lt;/a&gt;&amp;nbsp;is set&amp;nbsp;to 1 in the sdk_config.h and &lt;a title="Including header files" href="https://infocenter.nordicsemi.com/topic/ug_gsg_ses/UG/gsg/add_headers_ses.html?cp=1_1_0_7_5_1"&gt;Include header files&lt;/a&gt;&amp;nbsp;for&amp;nbsp; nRF5_SDK\components\softdevice\common\nrf_sdh_soc.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;e&amp;gt; NRF_SDH_SOC_ENABLED - nrf_sdh_soc - SoftDevice SoC event handler
//==========================================================
#ifndef NRF_SDH_SOC_ENABLED
#define NRF_SDH_SOC_ENABLED 1
#endif
// &amp;lt;h&amp;gt; SoC Observers - Observers and priority levels

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_SOC_OBSERVER_PRIO_LEVELS - Total number of priority levels for SoC observers. 
// &amp;lt;i&amp;gt; This setting configures the number of priority levels available for the SoC event handlers.
// &amp;lt;i&amp;gt; The priority level of a handler determines the order in which it receives events, with respect to other handlers.

#ifndef NRF_SDH_SOC_OBSERVER_PRIO_LEVELS
#define NRF_SDH_SOC_OBSERVER_PRIO_LEVELS 2
#endif

// &amp;lt;h&amp;gt; SoC Observers priorities - Invididual priorities

//==========================================================
// &amp;lt;o&amp;gt; BLE_DFU_SOC_OBSERVER_PRIO  
// &amp;lt;i&amp;gt; Priority with which BLE events are dispatched to the DFU Service.

#ifndef BLE_DFU_SOC_OBSERVER_PRIO
#define BLE_DFU_SOC_OBSERVER_PRIO 1
#endif

// &amp;lt;o&amp;gt; CLOCK_CONFIG_SOC_OBSERVER_PRIO  
// &amp;lt;i&amp;gt; Priority with which SoC events are dispatched to the Clock driver.

#ifndef CLOCK_CONFIG_SOC_OBSERVER_PRIO
#define CLOCK_CONFIG_SOC_OBSERVER_PRIO 0
#endif

// &amp;lt;o&amp;gt; POWER_CONFIG_SOC_OBSERVER_PRIO  
// &amp;lt;i&amp;gt; Priority with which SoC events are dispatched to the Power driver.

#ifndef POWER_CONFIG_SOC_OBSERVER_PRIO
#define POWER_CONFIG_SOC_OBSERVER_PRIO 0
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And that these files (under &lt;span&gt;nRF5_SDK\components\softdevice\common\&lt;/span&gt;) are included in your project:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-72b439899b6b4746987e3f4d86897a9f/pastedimage1582200998264v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/235377?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2020 09:41:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a7979d5-c783-4cd1-be7c-55e53436955b</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;I have tried this in blinky code it worked there, but it is not working in my custom application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/235340?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2020 08:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d21913b-79e3-46a8-9a15-70761cf7ef47</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Muhannad,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to use the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_template.html"&gt;Template Application&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;I saw the same issue in the blanky example instead of the template example.&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/235220?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2020 14:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0edb7c5-8950-4ca5-8e58-632375e2c80f</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;can you please update on this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/234861?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2020 11:02:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:886b399c-d0b3-491b-9cb3-5ba3a3eda5f9</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;#39;m_advertising_soc_obs&amp;#39; undeclared (first use in this function); did you mean &amp;#39;Advertising_Start&amp;#39;?&lt;/pre&gt;This is the error that compiler shows and the screenshot of the code attached. also, there is a warning.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1582023722758v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/234314?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2020 07:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b32c1d5c-2511-45c3-867e-40a482d40f02</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="Hassam Arshad"]but I&amp;#39;m getting this error in this&amp;nbsp;m_advertising_soc_obs variable. do you know about it?[/quote]
&lt;p&gt;&amp;nbsp;What is the error do you get? Could you provide the log or error code?&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/234249?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 16:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9005c0eb-117f-4523-97bc-4c0c534684d8</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;Yes I have followed the above steps but then we need to register the POF event with the softdevice stack that we can do by the following command&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SDH_SOC_OBSERVER(m_advertising_soc_obs, 1, sys_evt_dispatch, NULL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but I&amp;#39;m getting this error in this&amp;nbsp;m_advertising_soc_obs variable. do you know about it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/233908?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 09:35:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c549e92-16fd-4f04-87ce-340d4ef64225</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am not aware of any example other than that &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2218/pofwarn-example"&gt;example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The suggested usage should be:&lt;/p&gt;
&lt;p&gt;Enable and initialize&amp;nbsp;power fail warning after softdevice enabled by calling&amp;nbsp;sd_power_pof_enable() and&amp;nbsp;sd_power_pof_threshold_set(), the configurable thresholds are found in NRF_POWER_THRESHOLDS. The softdevice will then provide an&amp;nbsp;NRF_EVT_POWER_FAILURE_WARNING when the supply fall under the threshold.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t expect you will be able to catch a true power fail warning in any case, as the voltage falls so&amp;nbsp;very quickly and will terminate any CPU operation within ~100us in any case. Then once the voltage fall below brown out reset all pins will be floating and the chip will stop all operation in any case.&amp;nbsp;Personally, I think is better to periodically read the battery voltage and monitor over time using the comparator.&lt;/p&gt;
&lt;p&gt;You should also be aware that the power fail warning will prevent all flash write and erase operations, however, there will be no error from the hardware, the instructions are simply ignored by hardware, this can cause some strange results if you try to use the power failure warning as a battery monitor. The fstorage and fds do not handle this situation, so using LPCOMP may be a better idea.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/233795?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2020 14:43:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feed083f-dad8-425b-9a52-be2bd894af41</guid><dc:creator>Muhammad</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have gone through the link you are suggesting, I need the exact steps to perform the POF in nrf52 and SDK 16,&lt;/p&gt;
&lt;p&gt;As in SDK 8.1.0 the functions referred to in the post are not available in SDK 16.&lt;/p&gt;
&lt;p&gt;So please guide me regarding the SDK 16 and Softdevice S132.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POFWARN</title><link>https://devzone.nordicsemi.com/thread/233734?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2020 12:47:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dc038f4-5f38-437a-bffe-940667c2c9dd</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please refer to the example in this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2218/pofwarn-example/9361#9361"&gt;post&lt;/a&gt;. Please be aware that&amp;nbsp;&lt;span&gt;POF example with softdevice is for nRF51 SDK 8.1.0.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>