<?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>Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29531/chip-freezes-in-normal-operation-but-no-problem-when-debugging</link><description>Hi all, 
 I recently encounter this strange issue that I couldn&amp;#39;t understand. My code works perfectly fine during debugging on all 52832 chips, but freezes without response from time to time on some of the chips if run without debugging. When freezing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2018 10:13:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29531/chip-freezes-in-normal-operation-but-no-problem-when-debugging" /><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117388?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 10:13:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30657ee4-140c-4b2a-80fb-b0a31851a8cc</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Great! Let us hope that was the end of it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117387?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 10:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1726742b-b583-4a01-bcbc-1127fac5de07</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;Martin, thanks. I tried your method and looked like it worked. Will keep you posted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117382?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 16:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38f691b0-8ee9-49de-bbe6-76e11a60c3be</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;You can try that or you can use the system_nrf52.c file in SDK 12.3 that has implemented the workaround in SystemInit().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117381?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 09:09:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b840e57-f7fc-4207-a34c-97330d205401</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;Yes, I am using SDK 11 with 52832 QFAAB0. How can I use the workaround method?&lt;/p&gt;
&lt;p&gt;Just add *(volatile uint32_t &lt;em&gt;)0x40000EE4 = (&lt;/em&gt;(volatile uint32_t *)0x10000258 &amp;amp; 0x0000004F); in the first line of main()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117386?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 08:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a86ed811-048a-45c6-a187-33bd59367ea2</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi, What SDK are you using? 11? Could it be errata 108: &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.Rev1.errata/anomaly_832_108.html?cp=2_1_1_1_1_33"&gt;infocenter.nordicsemi.com/.../anomaly_832_108.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117376?ContentTypeID=1</link><pubDate>Sat, 20 Jan 2018 01:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51cdde78-0c43-4a0a-9abb-a7fb22598c74</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;Hi Martin, I was wrong, the answer above didn&amp;#39;t solve the problem. It temporarily eased the problem. But after I modified my code slightly in other totally unrelated place, this freezing issue shown up again....This time, I observed one board still has the problem. Will keep an eye on how other boards runs in long term.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117383?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 07:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d88ccf-b983-4f4e-9da2-4c7313718577</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Great! Glad you figured it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117380?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 14:12:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe2a9529-208b-4394-8e45-a1dfc0df276d</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;Martin, I think I just found a potential cause to the issue. Changing SCHED_MAX_EVENT_DATA_SIZE from sizeof(uint32_t) to sizeof(app_timer_event_t) seems to solve the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117378?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 12:47:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea28f6ff-0253-46a2-88a7-626011e4fda7</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;One of the biggest questions in I head is that, why the same code has different results on same type of chips?
Since each chip could be made slightly differently by various production conditions, can those factors cause performance difference therefore some just have enough performance to successfully run the code while others don’t? But still doesn’t make a lot sense if they runs fine during debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117377?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 12:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d485fdbc-cfa4-489d-8c44-75e447c3d484</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;For issue 2:
It happens in a scheduler function.&lt;/p&gt;
&lt;p&gt;Method 1: By setting and clearing LED1, LED2, LED3 …… on different location of the function, I know where the chip freezes base on which LEDs are set and which LEDs are cleared.&lt;/p&gt;
&lt;p&gt;Method 2: using SEGGER_RTT_WriteString() to print out tracing data. First, physically connecting to J-link (VCC, GND, SWDIO, SWCLK) but without software connection from IAR or J-Link RTT Viewer. After the board freezes, go to J-link RTT Viewer -&amp;gt;File -&amp;gt; conncet, such that the J-link can read the last SEGGER_RTT_WriteString() printed data from chip ram buffer.
Both methods verify that the chip freezes in random location of the scheduler function. The freezes location is so random that it sometimes freezes when exciting nrf_delay_ms().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117385?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 12:43:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4c2d19-14c0-4c08-9716-b40eb72c7be7</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;4, I verify the device freezing location in several ways:
If it freezes, it would not advertise any more. The boards have multiple LEDs, I inserts nrf_gpio_pin_toggle(LEDs) in timer and other locations. If they stop blinking, I know the board is freezing.&lt;/p&gt;
&lt;p&gt;How to know freezing location:
For issue 1:
I use oscilloscope to measure the current changes. I can see when the board is sleeping and when the board is waking up from sleep by a timer. I will see the current stays around 2.68 mA if the chip freezes, and it always happens at the end of timer events, in random moment (I can see the current start to drop a little at the end of the timer, then stop dropping and fluctuating around 2.68 mA).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117379?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 12:41:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51f9053e-6d65-4138-8e9f-d8f1fdf20ffd</guid><dc:creator>floatcloud</dc:creator><description>&lt;p&gt;Hi Martin,
Regarding your questions:&lt;/p&gt;
&lt;p&gt;1, Yes, always the same boards failed. If a board didn’t fail in the beginning, it wouldn’t failed at all.&lt;/p&gt;
&lt;p&gt;2, I have 5 boards, 3 of them has issue1, 2 out of the 3 has issue2. Since this is not a large sample group, is it possible to be a coincidence that some of the chips are partially damaged?&lt;/p&gt;
&lt;p&gt;3, In normal operations, I tired connecting the boards with only power supply (Vcc, GND), or physically connecting to J-link (VCC, GND, SWDIO, SWCLK) but without software connection from IAR or J-Link RTT Viewer. Both of them yielded the same result. Once I connected the board from IAR or J-Link RTT Viewer, the issues would disappear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Chip freezes in normal operation, but no problem when debugging</title><link>https://devzone.nordicsemi.com/thread/117384?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2018 11:29:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64d9e864-eba9-4e78-8484-a0ab7e5f9746</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I suppose the fact that it works on some, but not all boards must be a clue.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it always the same boards that fail? I.e. those who work, always work. It is not just a matter of time before they too fail?&lt;/li&gt;
&lt;li&gt;What is the failure rate?&lt;/li&gt;
&lt;li&gt;How do you power your devices in the different scenarios?&lt;/li&gt;
&lt;li&gt;How do you know that your device freezes when not having a debugger connected? More importantly maybe, how do you know &lt;em&gt;where&lt;/em&gt; it freezes? Is it possible that your device has asserted and is just stuck in an endless while loop in an error handler somewhere?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>