<?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>Reset nrf52832 on Short press and factory set on the Long press</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54483/reset-nrf52832-on-short-press-and-factory-set-on-the-long-press</link><description>Hello, 
 Good Day!! 
 My question regarding the reset functionality of the device. 
 Reset the device on the short press of the reset button and on Long press (for example 8 seconds) device must erase the user data and set back to factory settings on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Nov 2019 03:44:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54483/reset-nrf52832-on-short-press-and-factory-set-on-the-long-press" /><item><title>RE: Reset nrf52832 on Short press and factory set on the Long press</title><link>https://devzone.nordicsemi.com/thread/220702?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 03:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c742ea0-ae12-4adc-bb9b-27b192ffe3e7</guid><dc:creator>AimHigh</dc:creator><description>&lt;p&gt;@Kenneth thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset nrf52832 on Short press and factory set on the Long press</title><link>https://devzone.nordicsemi.com/thread/220564?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 12:45:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb4d9ee-8ea0-4884-8a6f-a769c7579cae</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would simply do a nvic_systremreset() on short button press.&lt;/p&gt;
&lt;p&gt;In the beginning of main() have a check if button is pressed, and a for-loop of 8000 using nrf_delay_ms(1) while button is pressed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If button is pressed 8000ms, then erase flash pages and continue to run in main().&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>