<?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 PIN flag of RESETREAS sets after power cycle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38657/reset-pin-flag-of-resetreas-sets-after-power-cycle</link><description>Hi, 
 
 
 I&amp;#39;m currently developing software on nrf52832. Unfortunately, I can&amp;#39;t use the SDK for different reasons. 
 I&amp;#39;m currently looking at the RESETREAS register. If I correctly understand the datasheet, I should have the RESETREAS register with all</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Sep 2018 09:53:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38657/reset-pin-flag-of-resetreas-sets-after-power-cycle" /><item><title>RE: RESET PIN flag of RESETREAS sets after power cycle</title><link>https://devzone.nordicsemi.com/thread/149596?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 09:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:750fd9ac-4568-441c-9115-993bb50ba5e3</guid><dc:creator>Florent</dc:creator><description>&lt;p&gt;Thank you for your answer Einar.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Indeed, it&amp;#39;s custom HW. Bu you are right. I will test on an DK board. I have no DK board with me today. I will therefore try tomorrow and see the behavior with this HW.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Concerning the reset pin, as you say, I will also test with the reset pin not enabled.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will inform you about the results tomorrow (after the test on the DK board).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Florent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET PIN flag of RESETREAS sets after power cycle</title><link>https://devzone.nordicsemi.com/thread/149594?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 09:38:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:666986c2-0452-4393-86c8-b7424f5b12f7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using custom HW? Could it be that for some reason the reset pin is asserted for some reason during power-up?&lt;/p&gt;
&lt;p&gt;My last question should not have been a separate point, so It became unclear. What I wander is if you see the same behaviour if you don&amp;#39;t have pin reset enabled (to disable it you have to erase UICR and do a power cycle)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET PIN flag of RESETREAS sets after power cycle</title><link>https://devzone.nordicsemi.com/thread/149591?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 09:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87aa7ace-5d5b-4165-9945-fea4d96ca471</guid><dc:creator>Florent</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can you upload a code snippet that reproduces it on your side? Here is what I&amp;#39;m doing:&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t reset_reason;
// Read the RESETREAS register
reset_reason = NRF_POWER-&amp;gt;RESETREAS;
// Clear the flag
NRF_POWER-&amp;gt;RESETREAS = 0xFFFFFFFF;&lt;/pre&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;After a power cycle, reset_reason = 1. After a soft reset from my code for instance, reset_reason = 4.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you see it occurring on multiple nRF52832 devices?&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;Yes I&amp;#39;ve tried on 3 devices and it happened on the 3.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is pin reset enabled for the device (PSELRESET in UICR)?&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;I think so but maybe I&amp;#39;m doing it in a wrong way. Here is how I do:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (((NRF_UICR-&amp;gt;PSELRESET[0] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos)) ||
  ((NRF_UICR-&amp;gt;PSELRESET[1] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos))){
	/** Configure the NVMC for write mode */
	NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos;
	while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){
		// Do nothing.
	}

	/** Activate the reset pin */
	NRF_UICR-&amp;gt;PSELRESET[0] = 21;
	while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){
		// Do nothing.
	}
	NRF_UICR-&amp;gt;PSELRESET[1] = 21;
	while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){
		// Do nothing.
	}

	/** Desactivate write mode for the NVMC (let it in read mode) */
	NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos;
	/** Wait until config is done */
	while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){
		// Do nothing.
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you see the same if it is not?&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;I&amp;#39;m not sure to understand what you mean sorry.&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance for your answer,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Florent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET PIN flag of RESETREAS sets after power cycle</title><link>https://devzone.nordicsemi.com/thread/149563?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 08:19:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b3c2cee-de4c-4ce2-8f50-8ca2c52bd39b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have not been able to reproduce this on my side. I have a few questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can you upload a code snippet that reproduces it on your side?&lt;/li&gt;
&lt;li&gt;Do you see it occurring on multiple nRF52832 devices?&lt;/li&gt;
&lt;li&gt;Is pin reset enabled for the device (PSELRESET in UICR)?&lt;/li&gt;
&lt;li&gt;Do you see the same if it is not?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>