<?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>How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45095/how-to-find-cause-of-a-fault-occurring-inside-a-softdevice</link><description>Hi, 
 I&amp;#39;m using SDK 13.1, SoftDevice 4.0.5 on nRF52832. I have an app which runs for a long time but will occasionally enter the hardfault handler from an address within the SoftDevice. Logging is turned off. My app stashes registers from the hardfault</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Mar 2019 09:49:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45095/how-to-find-cause-of-a-fault-occurring-inside-a-softdevice" /><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/178275?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 09:49:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d6aa753-8c53-4649-9964-792a01b32a16</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;It would be great if you can try to reproduce the issue on them.&lt;/p&gt;
&lt;p&gt;Could you list all of them with version number and date and if they have the issue or not?&lt;/p&gt;
&lt;p&gt;After you have tested them, can you try to do the same test, but this time you turn off all sd_app_evt_wait, WFE(); and system off?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/178186?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 16:57:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd3644a9-5ff9-4648-8f94-a897aab0f927</guid><dc:creator>mrwip</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for the ideas. The units have had the errata 108 workaround applied and are using MDK 8.17.0; I have verified that the line shown above is implemented.&lt;/p&gt;
&lt;p&gt;I do have a couple of DKs here and I&amp;#39;ll try to reproduce the issue with them.&lt;/p&gt;
&lt;p&gt;Some users have reported that the issue happened in a very dense RF environment (e.g., concert). Will the SoftDevice use a lot more power in that situation? I&amp;#39;m wondering if it could be a power supply related problem.&lt;/p&gt;
&lt;p&gt;Does the SoftDevice share the application stack? If so it may be a stack overflow I&amp;#39;m chasing.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/177747?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2019 08:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7363adb-6904-4c98-9cda-3395c2a5c3af</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;How many DK&amp;#39;s do you have? Can you try to implement the workaround for&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.Rev1.errata%2Fanomaly_832_108.html"&gt; Errata 108&lt;/a&gt;? The workaround is implemented in MDK version 8.9.0 and newer versions, so if you have a newer version it is already implemented.&lt;/p&gt;
&lt;p&gt;Apply the following code after any reset:&lt;code&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;*(volatile uint32_t *)0x40000EE4 = (*(volatile uint32_t *)0x10000258 &amp;amp; 0x0000004F);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;This workaround increases the I_RAM current per 4 KB section from 20nA to 30nA.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have many DK&amp;#39;s, do you experience this issue on other DK&amp;#39;s?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/177684?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2019 19:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:667baae6-851b-496d-9906-fd39eac9d74d</guid><dc:creator>mrwip</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t think that will be too productive -- the underlying problem is that I cannot reproduce the issue here -- and in takes days between the events. I&amp;#39;m only receiving reports from units in the field.&lt;/p&gt;
&lt;p&gt;Can you suggest anything? Or maybe tell me what the instruction &amp;quot;svc 255&amp;quot; is supposed to be doing? I&amp;#39;m speculating the underlying cause could be some sort of memory corruption, and knowing what should happen at that instruction might help me narrow down the possibilities.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/177591?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2019 13:28:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6fd1bd9-8fa3-4315-8a58-0f905d3360b3</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Can you provide me with your project? The behavior is not consistent with how one should expect the SoftDevice to work, so if you could provide me with your project so that I can reproduce the issue and take a look at it that would be great.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can of course make this case private if you don&amp;#39;t wish to share your project with anyone else.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/177422?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 15:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54cc55fb-1f73-48ae-9199-33b324f56a7b</guid><dc:creator>mrwip</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;I make no use of timeslots and have no high priority interrupts of which I am aware. I&amp;#39;m using standard drivers and haven&amp;#39;t changed their priority.&lt;/p&gt;
&lt;p&gt;Searching my sdk_config.h for *IRQ_PRIORITY* shows all are defined as 7. I see no calls to nrf_drv_common_irq_enable or NVIC_SetPriority or&amp;nbsp;sd_nvic_SetPriority in my code.&lt;/p&gt;
&lt;p&gt;Using the debugger, I stopped while my code was running and inspected the NVIC IPR registers. The non-zero values there were either 0xE0 or 0x80, except for the MWU (debugger) which was 0x20. I think the 0xE0 ones correspond to drivers I am using at priority 7 and the 0x80 ones (POWER_CLOCK_IRQn, RNG_IRQn, ECB_IRQn, CCM_AAR_IRQn, SWI5_EGU5_IRQn) are from the SoftDevice.&lt;/p&gt;
&lt;p&gt;Is there anything else I should look for?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is an annotated dump of the NVIC&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0x80  POWER_CLOCK_IRQn          =   0,              /*!&amp;lt; 0  POWER_CLOCK                                                            */
0x00  RADIO_IRQn                =   1,              /*!&amp;lt; 1  RADIO                                                                  */
0x00  UARTE0_UART0_IRQn         =   2,              /*!&amp;lt; 2  UARTE0_UART0                                                           */
0xE0  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn=   3,  /*!&amp;lt; 3  SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0                                      */
0xE0  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn=   4,  /*!&amp;lt; 4  SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1                                      */
0x00  NFCT_IRQn                 =   5,              /*!&amp;lt; 5  NFCT                                                                   */
0xE0  GPIOTE_IRQn               =   6,              /*!&amp;lt; 6  GPIOTE                                                                 */
0x00  SAADC_IRQn                =   7,              /*!&amp;lt; 7  SAADC                                                                  */
0x00  TIMER0_IRQn               =   8,              /*!&amp;lt; 8  TIMER0                                                                 */
0x00  TIMER1_IRQn               =   9,              /*!&amp;lt; 9  TIMER1                                                                 */
0x00  TIMER2_IRQn               =  10,              /*!&amp;lt; 10 TIMER2                                                                 */
0x00  RTC0_IRQn                 =  11,              /*!&amp;lt; 11 RTC0                                                                   */
0x00  TEMP_IRQn                 =  12,              /*!&amp;lt; 12 TEMP                                                                   */
0x80  RNG_IRQn                  =  13,              /*!&amp;lt; 13 RNG                                                                    */
0x80  ECB_IRQn                  =  14,              /*!&amp;lt; 14 ECB                                                                    */
0x80  CCM_AAR_IRQn              =  15,              /*!&amp;lt; 15 CCM_AAR                                                                */
0xE0  WDT_IRQn                  =  16,              /*!&amp;lt; 16 WDT                                                                    */
0xE0  RTC1_IRQn                 =  17,              /*!&amp;lt; 17 RTC1                                                                   */
0x00  QDEC_IRQn                 =  18,              /*!&amp;lt; 18 QDEC                                                                   */
0xE0  COMP_LPCOMP_IRQn          =  19,              /*!&amp;lt; 19 COMP_LPCOMP                                                            */
0xE0  SWI0_EGU0_IRQn            =  20,              /*!&amp;lt; 20 SWI0_EGU0                                                              */
0xE0  SWI1_EGU1_IRQn            =  21,              /*!&amp;lt; 21 SWI1_EGU1                                                              */
0xE0  SWI2_EGU2_IRQn            =  22,              /*!&amp;lt; 22 SWI2_EGU2                                                              */
0x00  SWI3_EGU3_IRQn            =  23,              /*!&amp;lt; 23 SWI3_EGU3                                                              */
0x00  SWI4_EGU4_IRQn            =  24,              /*!&amp;lt; 24 SWI4_EGU4                                                              */
0x80  SWI5_EGU5_IRQn            =  25,              /*!&amp;lt; 25 SWI5_EGU5                                                              */
0x00  TIMER3_IRQn               =  26,              /*!&amp;lt; 26 TIMER3                                                                 */
0x00  TIMER4_IRQn               =  27,              /*!&amp;lt; 27 TIMER4                                                                 */
0x00  PWM0_IRQn                 =  28,              /*!&amp;lt; 28 PWM0                                                                   */
0x00  PDM_IRQn                  =  29,              /*!&amp;lt; 29 PDM                                                                    */
0x00  MWU_IRQn                  =  32,              /*!&amp;lt; 32 MWU                                                                    */
0x00  PWM1_IRQn                 =  33,              /*!&amp;lt; 33 PWM1                                                                   */
0x20  PWM2_IRQn                 =  34,              /*!&amp;lt; 34 PWM2                                                                   */
0x00  SPIM2_SPIS2_SPI2_IRQn     =  35,              /*!&amp;lt; 35 SPIM2_SPIS2_SPI2                                                       */
0x00  RTC2_IRQn                 =  36,              /*!&amp;lt; 36 RTC2                                                                   */
0x00  I2S_IRQn                  =  37,              /*!&amp;lt; 37 I2S                                                                    */
0xE0  FPU_IRQn                  =  38               /*!&amp;lt; 38 FPU                                                                    */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find cause of a fault occurring inside a SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/177240?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 08:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021e0d93-7688-4b62-897a-797be84cffa1</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The SoftDevice is a precompiled hex file, as you might know. I cannot show you the code which hard faults, but I can tell you the cause of the hard faults.&lt;/p&gt;
&lt;p&gt;All the hard fault addresses could relate to either:&lt;/p&gt;
&lt;p&gt;1. Wrong use of timeslots, by that I mean that a timeslot is not properly managed and closed before the SoftDevice needs to do something.&lt;/p&gt;
&lt;p&gt;2. An interrupt has to high priority and interrupts the SoftDevice when it is doing something.&lt;/p&gt;
&lt;p&gt;Do you use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fmultiprotocol_operation%2Fmultiprotocol_support.html&amp;amp;cp=2_3_1_0_8"&gt;timeslots&lt;/a&gt;? Have you given an interrupt a to &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fprocessor_avail_interrupt_latency%2Fexception_mgmt_sd.html"&gt;high priority&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>