<?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>nRF52832 POF (Power-fail comparator) usage on NCS platform</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109436/nrf52832-pof-power-fail-comparator-usage-on-ncs-platform</link><description>Dear support team, 
 Is there any example of using POF (Power-fail comparator) on NCS, I need such reference code. I made the following modifications on NCS_v1.8.0: 1. Add the following two lines to soc_flash_nrf.c 
 2. Add one line to line 302 and set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Mar 2024 03:31:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109436/nrf52832-pof-power-fail-comparator-usage-on-ncs-platform" /><item><title>RE: nRF52832 POF (Power-fail comparator) usage on NCS platform</title><link>https://devzone.nordicsemi.com/thread/474979?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2024 03:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f48dee8-19b8-40e7-b411-9d5ef924e47b</guid><dc:creator>zero</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Verification is feasible, thank you for your support&lt;/p&gt;
&lt;p&gt;BR，&lt;/p&gt;
&lt;p&gt;Zero&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 POF (Power-fail comparator) usage on NCS platform</title><link>https://devzone.nordicsemi.com/thread/474900?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2024 13:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc9c17dd-dbb6-4376-8dba-36f9c6ac83b2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Is it possible to modify this way?[/quote]
&lt;p&gt;What is it you want to modify?&lt;/p&gt;
[quote user=""]Why is this POFWARN not turned on by default in the nRF52832 code?[/quote]
&lt;p&gt;POF warning is generally not enabled by default in any of our SDKs. It has a feature that you have described here, where flash writes are ignored (silently), which is sometimes not desierable. There is also no sample, but it can quite easily be used. I see you got it working, but another approach could be to add&amp;nbsp;CONFIG_NRFX_POWER=y to your project configuration, and then do something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if CONFIG_NRFX_POWER
#include &amp;lt;nrfx_power.h&amp;gt;

void pof_cb(void)
{
	printk(&amp;quot;POF event\n&amp;quot;);
}

static void pof_enable(void)
{
	nrfx_power_pofwarn_config_t pof_config = {
		.handler = pof_cb, 
		.thr = NRF_POWER_POFTHR_V22,
		.thrvddh = NRF_POWER_POFTHRVDDH_V29
	};

	nrfx_power_pof_init(&amp;amp;pof_config);
	nrfx_power_pof_enable(&amp;amp;pof_config);
}
#endif &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>