<?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 with SDK v11.0.0 -- System Randomly Freeze and Doesn&amp;#39;t Recover via WDog</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58100/nrf52832-with-sdk-v11-0-0----system-randomly-freeze-and-doesn-t-recover-via-wdog</link><description>Hello, 
 
 Currently, we are working on a product which leverages the following: 
 NRF52832 (64KB RAM and 512 KB Flash) 
 SDK v11.0.0 
 Soft Device 132 
 It has been reported out in the field that our product is randomly &amp;quot;freezing&amp;quot;. After weeks of FW</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Apr 2020 07:28:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58100/nrf52832-with-sdk-v11-0-0----system-randomly-freeze-and-doesn-t-recover-via-wdog" /><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/243093?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 07:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cbf5983-70dc-4153-9dea-fee6f24febc6</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sami Balbaky,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if a RAM corruption occurs due to Errata 108 issue,&amp;nbsp; then this can cause a HardFault if the CPU fetches a corrupt instruction that points to a memory location outside the nRF52832s memory area. and the HardFault exception will trigger HardFault_Handler in the application. The HardFault exception is always enabled and has a fixed priority, -1 (higher than other interrupts and exceptions), so while the CPU is in the Hardfault handler it will prevent other interrupts with lower priority from being serviced.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I took a closer look at default HardFault handler implementation in the system_nrf52.c file and this will just loop indefinitely. The HardFault_Handler in the system_nrf52.c file is a weak implementation&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  .weak   HardFault_Handler
HardFault_Handler:
  b     .
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which basically is equivalent to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;HardFault_Handler:
  b HardFault_Handler&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So if you want the Hardfault exception to trigger a reset then you need to override the weak implementation and issue a SoftReset,i.e. NVIC_SystemReset().&lt;/p&gt;
&lt;p&gt;However, the WDT will reset the device if it is running when the HardFault occurs. As discussed previously the WDT is independent of the CPU, it will trigger a reset regardless of the CPU state. When the HardFault occurs the CPU is basically just looping the HardFault handler.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/242786?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 19:34:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61248c93-4a9c-4c35-99fe-ec7d5d3c77b2</guid><dc:creator>Sami</dc:creator><description>&lt;p&gt;Thank you. If the bug, i.e., errata 108, does occur, could it lead to a &amp;quot;screen freeze&amp;quot;/&amp;quot;blank screen&amp;quot; that does not recover via WDog timeout reset? Also, are interrupts also frozen?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/239489?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 10:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09829b77-1bc8-4735-be61-f4708a8e522d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Sami,&lt;/p&gt;
&lt;p&gt;Yes, you should create an array that covers as much of RAM as possible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have attached the code we have been using internally to check if devices are affected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-780124a371a441668b8e542250788a9d/errata_5F00_108_5F00_test_5F00_code.zip"&gt;devzone.nordicsemi.com/.../errata_5F00_108_5F00_test_5F00_code.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/239231?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 23:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfce4a20-7638-44a7-bdad-c3a8dd9ebb45</guid><dc:creator>Sami</dc:creator><description>&lt;p&gt;I created an external array:&lt;/p&gt;
&lt;p&gt;uint32_t errata108Arr[10] = {0};&lt;/p&gt;
&lt;p&gt;so that it lives in the .bss section (i.e., not the stack). Then, I put the system into System OFF mode, waited a few seconds, and then woke the system back up (System ON mode). The array still preserved its contents. Do I need to check all memory blocks outside of the stack in accordance with what you said: &amp;quot;the location of the bits that flip may vary from chip to chip.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/237941?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 08:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bd91e53-e86b-4a7c-98f9-10055b4c7d4d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Sami,&lt;br /&gt;the location of the bits that flip may vary from chip to chip, but the location seems to be fixed for every chip that do fail. Only a few bits (e.g. 1-5) spread across RAM.&lt;/p&gt;
&lt;p&gt;The way we test the issue is that we initialize the RAM blocks not used by the stack to all 0&amp;#39;s and then enter System ON Idle and wake up from a timer. We then examine the RAM blocks after wake-up and check if any bits have been flipped.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/237877?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 18:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:025e7775-5299-40d5-acbd-081c76d4eecc</guid><dc:creator>Sami</dc:creator><description>&lt;p&gt;So I could conceivably run a test where I loop the system between &amp;quot;System ON idle&amp;quot; and system active in order to induce this hard fault? Could you provide context as to how I could induce this issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/235938?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2020 12:05:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7a666fc-0895-4254-8116-a8c374141837</guid><dc:creator>bjorn-spockeli</dc:creator><description>[quote user="sami_cala"]- We are using MDK v8.5.0, and we have not implemented the work-around. I became aware of Errata 108 last week, but wasn&amp;#39;t sure how it was affecting our system, if at all. It sounds like RAM content can be deemed indeterminant if System OFF mode is ever entered and then woken up without the work-around?[/quote]
&lt;p&gt;&amp;nbsp;Errata 108 may occur when the system is waking up from System ON idle as well, not just System OFF. So everytime you wakeup from System ON idle, there is a chance that RAM is not retained correctly, which may lead to random hardfaults if values in the stack is modified to a value outside the valid memory range.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/235788?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 17:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85c0447d-cfa7-4461-9396-8cf22bcbe0a0</guid><dc:creator>Sami</dc:creator><description>&lt;p&gt;We have not been able to reproduce the issue in-house, so we don&amp;#39;t know if a hard-fault is occurring, let alone occurring in the same location.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Yes, we are enabling the WDT in main(), before we enter the executive task (&amp;quot;scheduler loop&amp;quot;).&lt;/p&gt;
&lt;p&gt;-Yes, we have a bootloader present on the nRF52832.&lt;/p&gt;
&lt;p&gt;-Yes, the device enters System OFF once and once only, while it is sitting on the shelf. Once transitioned to System ON mode, it will never enter System OFF mode again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- We are using MDK v8.5.0, and we have not implemented the work-around. I became aware of Errata 108 last week, but wasn&amp;#39;t sure how it was affecting our system, if at all. It sounds like RAM content can be deemed indeterminant if System OFF mode is ever entered and then woken up without the work-around?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/235735?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 13:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd6dcbf8-395d-4a8f-928f-2c52fb9275a1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Also which MDK version are you using in your code? SDK v11.0.0 uses v8.5.0, so if you have not updated the MDK to v8.9.0, then I strongly recommend adding the workaround for the 108 errata.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_108.html?cp=4_2_1_0_1_30"&gt;[108] RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 with SDK v11.0.0 -- System Randomly Freeze and Doesn't Recover via WDog</title><link>https://devzone.nordicsemi.com/thread/235734?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 13:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:785affd4-9d11-49b0-b06d-26ceb3d8ed4c</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sami,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you been able to determine&amp;nbsp;if the Hardfaults occur at the same location? Or are they occuring randomly ? We do have a&amp;nbsp;&lt;a title="Software Development Kit" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/lib_hardfault.html?resultof=%22%48%61%72%64%46%61%75%6c%74%22%20%22%68%61%72%64%66%61%75%6c%74%22%20%22%68%61%6e%64%6c%69%6e%67%22%20%22%68%61%6e%64%6c%22%20%22%6c%69%62%72%61%72%79%22%20%22%6c%69%62%72%61%72%69%22%20"&gt;nRF5 SDK v11.0.0: HardFault handling library&lt;/a&gt;&amp;nbsp;that is very useful when it comes do debugging these issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you enabling the WDT upon entering main()? Do you have a bootloader present on the nRF52832? Is your device entering System OFF?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The WDT in the nRF52 Series does rely on an interrupt to reset the SoC , if the WDT times out then the system will be reset, regardless of the state of the CPU. The WDT is decoupled from the CPU to avoid the scenario that are describing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>