<?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>detect brownout on reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14803/detect-brownout-on-reset</link><description>I would like to detect if a reset happened due to a brownout or an actual power off. 
 I tired so far using the GPREGRET and RESETREAS registers. They are useful to detect soft resets and distinguish between their causes, but since they are cleared on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Aug 2018 07:15:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14803/detect-brownout-on-reset" /><item><title>RE: detect brownout on reset</title><link>https://devzone.nordicsemi.com/thread/142305?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 07:15:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78cdae63-947d-42c2-a18a-fb4a7f236896</guid><dc:creator>rgrr2</dc:creator><description>&lt;p&gt;Although this is old... how can one do a softdevice reset without actually resetting the device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: detect brownout on reset</title><link>https://devzone.nordicsemi.com/thread/56510?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2016 12:42:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4a22b2-fa6a-40c8-b141-e297251f92b1</guid><dc:creator>Dominik</dc:creator><description>&lt;p&gt;Thanks for your input. Unfortunately using ADC to monitor the power doesn&amp;#39;t work out, our device is connected to the 230V power line, not to a battery. But I think I found a nice solution. I use the power fail comparator, and in case of a warning, I set a brownout flag on the gpregret and force a softdevice reset, before the device actually brownsout. like this I also don&amp;#39;t lose the gpregret register and can use the info after the reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: detect brownout on reset</title><link>https://devzone.nordicsemi.com/thread/56509?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2016 17:00:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb429245-b4f3-45c7-8ef7-56336d18a42b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Dominik&lt;/p&gt;
&lt;p&gt;Both answers on &lt;a href="https://devzone.nordicsemi.com/question/84415/quickly-perform-flash-write-during-power-loss/?answer=84707#post-id-84707"&gt;this thread&lt;/a&gt; might have ideas. Additionally, you could use internal ADC to monitor battery voltage and trigger flash operation in time. Some ADC examples &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/tree/nRF51-SDK-9-0-0"&gt;here&lt;/a&gt;. There is also &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fexamples.html&amp;amp;cp=5_0_0_4"&gt;adc example in the SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t otherwise see a way to know if reset was caused by brownout-reset or power-on-reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>