<?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 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52326/nrf52832-hangs-in-non-debug-mode</link><description>We have custom developed board using nrf52832. When I run the example program developed in SDK15.0.0 with Soft device S132 V6.1.1, no issue noticed in running debug mode (with J-link Debugger) or non-debug mode. 
 If we run the already developed code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Sep 2019 17:42:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52326/nrf52832-hangs-in-non-debug-mode" /><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/211623?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 17:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b7f647e-5fa2-44e1-bc1b-e70fb87bcfc8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;sd_app_evt_wait() and __WFE() has the same effect, but&amp;nbsp; the Softdevice must be enabled&amp;nbsp;before you can use&amp;nbsp;&lt;span&gt;sd_app_evt_wait(). The function which initializes and enables the Softdevice is usually named &amp;#39;ble_stack_init()&amp;#39; in our code examples.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/211614?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 16:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d172803b-add2-462e-840e-a15a4d5194c6</guid><dc:creator>DevenE</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&lt;/p&gt;
&lt;p&gt;Thanks for your clarification. &amp;nbsp;LED is toggle one time only inside the &amp;ldquo;while&amp;rdquo; loop&amp;rdquo; and after first iteration, it hangs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Further debug on this issue, I noticed that end of the first iteration on the &amp;ldquo;while&amp;rdquo; loop,&amp;nbsp; it&amp;rsquo;s entered in to the low power mode. After that, it cannot be waked up by key press interrupt or Power timer interrupt (1 Sec. power timer) from our code. In the low power mode, we expect to be in the &lt;strong&gt;&amp;ldquo;&lt;u&gt;System ON, Full RAM retention, Wake on any event&lt;/u&gt;&amp;rdquo;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order to enter in low power mode &lt;strong&gt;&amp;ldquo;sd_app_evt_wait()&amp;rdquo;&lt;/strong&gt; function is called originally in our code. When I change this to &lt;strong&gt;&amp;ldquo;__WFE()&amp;rdquo;, &lt;/strong&gt;&amp;nbsp;I couldn&amp;rsquo;t noticed any hang issue on &amp;ldquo;while&amp;rdquo; loop on non-debug mode.&lt;/p&gt;
&lt;p&gt;Could you please advise possible root cause for this behaviour? &amp;nbsp;We suppose to have ultra-low power mode when the instrument is idle in order to save power.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210890?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2019 10:28:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae031086-a94c-40aa-9592-bcf71563dac9</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8304._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210875?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2019 08:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:152ee1ca-dda2-4803-8602-2713abab9b03</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ok, it doesn&amp;#39;t&amp;nbsp;appear to be related to the DCDC regulator. I was just trying to think of reasons as to why it only works in debug mode.&amp;nbsp;&lt;/p&gt;
[quote user="DevenE"]One more suspect, before entering the while loop, we&amp;nbsp; call &amp;quot;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;, &amp;#39;Helvetica&amp;#39;, Arial, sans-serif;font-size:14px;font-style:italic;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;nrf_drv_timer_ms_to_ticks&lt;/span&gt;&amp;quot; as below. When I include the test code to turn On/Off LED before and after this call, I noticed it doesn&amp;#39;t work as expect. Not sure, this is the root cause. Please advise.[/quote]
&lt;p&gt;&amp;nbsp;Does the LED blink at all? nrf_drv_timer_ms_to_ticks() is only used to convert time in ms to timer &amp;#39;ticks&amp;#39;, it won&amp;#39;t start&amp;nbsp;your&amp;nbsp;&lt;em&gt;gstPOWER_TIMER instance&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210797?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 23:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1db63124-60ea-4840-9bb2-f1102d135ad0</guid><dc:creator>DevenE</dc:creator><description>&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;1. I enable the&amp;nbsp; DCDC in &amp;quot;sdk_config.h&amp;quot; and noticed that 1.265V @ DCC4 pin. I&lt;/span&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;ssue still exist. 1.265V Voltage at &amp;quot;DEC4&amp;quot; pin is acceptable level?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;2. One more suspect, before entering the while loop, we&amp;nbsp; call &amp;quot;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:italic;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;nrf_drv_timer_ms_to_ticks&lt;/span&gt;&amp;quot; as below. When I include the test code to turn On/Off LED before and after this call, I noticed it doesn&amp;#39;t work as expect. Not sure, this is the root cause. Please advise.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt; /*Get Timer u32Ticks to provide 1sec transmission via BLE */&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; u32PowerTicks = nrf_drv_timer_ms_to_ticks(&amp;amp;gstPOWER_TIMER, 1000);&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;&lt;em&gt;&amp;nbsp; nrf_delay_ms(2000);&amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&amp;nbsp; while(true)&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&amp;nbsp; {&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; &lt;/em&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; /* Check button pressed or not */&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u32ErrCode = handle_push_button_functionality(&amp;amp;bStartAdvertise);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NRF_SUCCESS != u32ErrCode)&lt;/em&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Any help is much appreciated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Thank You.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210758?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 15:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0be78d2a-32fb-4073-a965-30397b68c67d</guid><dc:creator>DevenE</dc:creator><description>&lt;p&gt;I enable the&amp;nbsp; DCDC in &amp;quot;sdk_config.h&amp;quot; and noticed that 1.265V @ DCC4 pin.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210753?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 14:35:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:324ad08a-d6c1-4545-aa78-dffdae4aa7af</guid><dc:creator>DevenE</dc:creator><description>&lt;p&gt;Thank you Vidar Beng for your response.&lt;/p&gt;
&lt;p&gt;DCDC regulator is not enabled in our code: Only noticed in &amp;quot;sdk_Congif.h&amp;quot;&amp;nbsp; but it&amp;#39;s not enabled.&lt;/p&gt;
&lt;div&gt;/&lt;em&gt;/ &amp;lt;q&amp;gt; POWER_CONFIG_DEFAULT_DCDCEN&amp;nbsp; - The default configuration of main DCDC regulator&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;// &amp;lt;i&amp;gt; This settings means only that components for DCDC regulator are installed and it can be enabled.&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;#ifndef POWER_CONFIG_DEFAULT_DCDCEN&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#define POWER_CONFIG_DEFAULT_DCDCEN 0&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#endif&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;// &amp;lt;q&amp;gt; POWER_CONFIG_DEFAULT_DCDCENHV&amp;nbsp; - The default configuration of High Voltage DCDC regulator&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;// &amp;lt;i&amp;gt; This settings means only that components for DCDC regulator are installed and it can be enabled.&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;#ifndef POWER_CONFIG_DEFAULT_DCDCENHV&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#define POWER_CONFIG_DEFAULT_DCDCENHV 0&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#endif&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;2 extra inductors (15uH &amp;amp; 15nH) are used in our board as Raytac&amp;#39;s MDBT42 V P 512K V2 reference design.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1568903508191v1.png" alt=" " /&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Our input power is 3V and well stable from the measurement.The firmware examples that we followed, I didn&amp;#39;t notice that DCDC is enabled in the firmware. Please advise w&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;hat circumference, DCDC is need to enable?&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210733?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 13:55:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20985945-24d8-48a3-bda4-a1671920998a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Are you&amp;nbsp;enabling&amp;nbsp;the DCDC regulator in your old code by any chance? This&amp;nbsp;could potentially explain the difference between debug and non-debug mode in your case.&amp;nbsp;The chip will always use the LDO regulator when in debug mode, while it&amp;#39;s FW dependent when you exit it.&amp;nbsp; In that case, maybe you are missing the two extra inductors required for DCDC operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210558?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 22:49:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e24493b2-cfba-4e20-93c7-e6afd3e2bf0f</guid><dc:creator>DevenE</dc:creator><description>&lt;p&gt;infinite &amp;quot;While loop&amp;quot; in the main () routine. After initialization, it&amp;rsquo;s enter into the infinite while loop. Basically it checks the key press interrupt, if key pressed start advertising before go to low power mode in the&amp;nbsp; while loop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;ldquo; Debug Mode&amp;rdquo;&lt;/strong&gt; : J-link is connected to Segger Embedded Studio IDE and run the program in debug mode.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;ldquo;Non Debug mode&amp;rdquo;:&lt;/strong&gt; With out J-link connection. I tried different build configuration (release &amp;nbsp;&amp;amp; debug) as well. Also, checked with 32.768kHz external Xtal on the board and with out external Xtal (Configured internal RC).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Example program developed in SDK15.0.0 with Soft device S132 V6.1.1, no issue noticed in debug &amp;amp; non- debug mode. I am able to scan the BLE device from &amp;quot;nrfConnect&amp;quot; apps from my phone establish connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 hangs in non-debug mode</title><link>https://devzone.nordicsemi.com/thread/210557?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 22:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32b0784d-9816-47eb-bf35-ac5efd0cb88a</guid><dc:creator>awneil</dc:creator><description>[quote userid="83433" url="~/f/nordic-q-a/52326/nrf52832-hangs-in-non-debug-mode"]hangs on the while loop[/quote]
&lt;p&gt;What &amp;quot;while loop&amp;quot; ?&lt;/p&gt;
&lt;p&gt;When you say &amp;quot;&lt;strong&gt;debug mode&lt;/strong&gt;&amp;quot;&lt;span&gt;&amp;nbsp;and &amp;quot;&lt;/span&gt;&lt;strong&gt;non-debug mode&lt;/strong&gt;&amp;quot; are you talking about different build configurations? or whether the J-Link is connected or not? or whether a debug session is active or not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>