<?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>Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63577/softdevice-assertion-failed-after-some-time-of-advertisment-without-event</link><description>Hello, 
 
 I&amp;#39;ve a very strange problem with the nrf52838 chip in the ISP4520 ( https://www.insightsip.com/products/combo-smart-modules/isp4520 ). 
 The nrf52832 advertise all the time and after some time the softdevice assert an error. I have a watchdog</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Jul 2020 12:59:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63577/softdevice-assertion-failed-after-some-time-of-advertisment-without-event" /><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259242?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:59:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86f1de2b-0867-4333-baed-6bece67f7fb2</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;Ah everything is clear now, I didn&amp;#39;t know that softdevice do not make an event in my loop...&lt;br /&gt;Thank&amp;#39;s for your help, you can make this post public if you want.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Valentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259241?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa1b547d-963b-4d3d-99c0-359c9580ccfd</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Good to hear you have found the problem.&lt;/p&gt;
&lt;p&gt;You need a timer (e.g. app_timer) to wakeup the application at an interval that is shorter than the wdt yes. Whether you feed the dog from the timer timeout handler or in the while loop in main before entering sleep again is up to you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259240?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:39:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:039259c1-0f19-453b-b6ee-b7e76b805673</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;I read some devzone topic and some people said that the watchdog need to be feed with another timer when softdevice is running and no event occur.&lt;br /&gt;Is that true ? May I declare a timer who feed watchdog each 30 minutes for example ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Valentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259239?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:01:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4277a0f-0463-4a6a-9178-95eff0d1583a</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;I have some good news, I think I found the bug and it&amp;#39;s about the watchdog driver… I comment this part of my code and now there is no more reset. This was my WDT conf :&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;e&amp;gt; NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver
//==========================================================
#ifndef NRFX_WDT_ENABLED
#define NRFX_WDT_ENABLED 1
#endif
// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_BEHAVIOUR  - WDT behavior in CPU SLEEP or HALT mode
 
// &amp;lt;1=&amp;gt; Run in SLEEP, Pause in HALT 
// &amp;lt;8=&amp;gt; Pause in SLEEP, Run in HALT 
// &amp;lt;9=&amp;gt; Run in SLEEP and HALT 
// &amp;lt;0=&amp;gt; Pause in SLEEP and HALT 

#ifndef NRFX_WDT_CONFIG_BEHAVIOUR
#define NRFX_WDT_CONFIG_BEHAVIOUR 8
#endif

// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_RELOAD_VALUE - Reload value  &amp;lt;15-4294967295&amp;gt; 


#ifndef NRFX_WDT_CONFIG_RELOAD_VALUE
#define NRFX_WDT_CONFIG_RELOAD_VALUE 2000
#endif

// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_NO_IRQ  - Remove WDT IRQ handling from WDT driver
 
// &amp;lt;0=&amp;gt; Include WDT IRQ handling 
// &amp;lt;1=&amp;gt; Remove WDT IRQ handling 

#ifndef NRFX_WDT_CONFIG_NO_IRQ
#define NRFX_WDT_CONFIG_NO_IRQ 1
#endif

// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_IRQ_PRIORITY  - Interrupt priority
 
// &amp;lt;0=&amp;gt; 0 (highest) 
// &amp;lt;1=&amp;gt; 1 
// &amp;lt;2=&amp;gt; 2 
// &amp;lt;3=&amp;gt; 3 
// &amp;lt;4=&amp;gt; 4 
// &amp;lt;5=&amp;gt; 5 
// &amp;lt;6=&amp;gt; 6 
// &amp;lt;7=&amp;gt; 7 

#ifndef NRFX_WDT_CONFIG_IRQ_PRIORITY
#define NRFX_WDT_CONFIG_IRQ_PRIORITY 6
#endif

// &amp;lt;e&amp;gt; NRFX_WDT_CONFIG_LOG_ENABLED - Enables logging in the module.
//==========================================================
#ifndef NRFX_WDT_CONFIG_LOG_ENABLED
#define NRFX_WDT_CONFIG_LOG_ENABLED 0
#endif
// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_LOG_LEVEL  - Default Severity level
 
// &amp;lt;0=&amp;gt; Off 
// &amp;lt;1=&amp;gt; Error 
// &amp;lt;2=&amp;gt; Warning 
// &amp;lt;3=&amp;gt; Info 
// &amp;lt;4=&amp;gt; Debug 

#ifndef NRFX_WDT_CONFIG_LOG_LEVEL
#define NRFX_WDT_CONFIG_LOG_LEVEL 3
#endif

// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_INFO_COLOR  - ANSI escape code prefix.
 
// &amp;lt;0=&amp;gt; Default 
// &amp;lt;1=&amp;gt; Black 
// &amp;lt;2=&amp;gt; Red 
// &amp;lt;3=&amp;gt; Green 
// &amp;lt;4=&amp;gt; Yellow 
// &amp;lt;5=&amp;gt; Blue 
// &amp;lt;6=&amp;gt; Magenta 
// &amp;lt;7=&amp;gt; Cyan 
// &amp;lt;8=&amp;gt; White 

#ifndef NRFX_WDT_CONFIG_INFO_COLOR
#define NRFX_WDT_CONFIG_INFO_COLOR 0
#endif

// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.
 
// &amp;lt;0=&amp;gt; Default 
// &amp;lt;1=&amp;gt; Black 
// &amp;lt;2=&amp;gt; Red 
// &amp;lt;3=&amp;gt; Green 
// &amp;lt;4=&amp;gt; Yellow 
// &amp;lt;5=&amp;gt; Blue 
// &amp;lt;6=&amp;gt; Magenta 
// &amp;lt;7=&amp;gt; Cyan 
// &amp;lt;8=&amp;gt; White 

#ifndef NRFX_WDT_CONFIG_DEBUG_COLOR
#define NRFX_WDT_CONFIG_DEBUG_COLOR 0
#endif

// &amp;lt;/e&amp;gt;

// &amp;lt;/e&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I try to change initialized value, can you help me about this ?&lt;br /&gt;&lt;br /&gt;Valentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259238?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 11:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f28af80c-e0c4-4aed-ba6d-59949ffd2c5e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you have a project I can compile and run on a stand-alone nRF52-DK I can look into it.&lt;/p&gt;
&lt;p&gt;Edit: The case is now private.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259237?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 08:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6aa59708-fe4a-4b44-aae3-f377eb98f88e</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I tried my code in the board PCA10040 and the reset is still here. I will try different parameter in BLE section.&lt;br /&gt;It&amp;#39;s possible to have code review of my Bluetooth initialisation in private ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Valentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259236?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 08:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f16d503-6d75-48a5-9473-bd09bf545030</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I don&amp;#39;t have any explanation to this,&amp;nbsp;I cannot find similar reports.&lt;/p&gt;
&lt;p&gt;Do you see the same on multiple modules or is it this module in specific?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259235?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 15:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a5e7ad9-935a-44cf-90ca-4d1b68567d48</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;br /&gt;&lt;br /&gt;I&amp;nbsp;always have the problem....&lt;br /&gt;&lt;br /&gt;I found more clues : when I comment the code&amp;nbsp;NVIC_ClearPendingIRQ(FPU_IRQn) in function pwr_mgmt_fpu_sleep_prepare() use by pwr_management, the nrf52832 don&amp;#39;t reset. I try to decrease interrupt priority of&amp;nbsp;&lt;span&gt;FPU_IRQn but no result...&lt;br /&gt;&lt;br /&gt;So, the nrf52832 reset after some time related to the Bluetooth advertisement interval,&amp;nbsp;the longer the interval, the longer the time between two resets.&lt;br /&gt;It&amp;#39;s possible that advertisment do a division by 0 that catch by FPU ?&lt;br /&gt;&lt;br /&gt;I use the flag&amp;nbsp;BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED, can this flag change something ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Valentin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259234?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 12:24:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7230d4f9-0d25-4094-be00-6c66b0ca9425</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;Ok, I don&amp;#39;t understand neither... I will do more test to be sure that the bug is gone.&lt;br /&gt;In the code, I see the macro&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;CRITICAL_REGION_ENTER&lt;/span&gt;() and&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;CRITICAL_REGION_EXIT&lt;/span&gt;() but an enter is folow by an exit&amp;nbsp; :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void TimerStart (TimerEvent_t *obj)
{
    uint32_t elapsedTime = 0;
	 
    if ((obj == NULL) || (TimerExists(obj) == true))
    {
        return;
    }
	
    CRITICAL_REGION_ENTER();
	
    obj-&amp;gt;Timestamp = obj-&amp;gt;ReloadValue;
    obj-&amp;gt;IsRunning = false;

    // First obj in the list
    if (TimerListHead == NULL)
    {
        // enable RTC2 CC[0] interrupts
        NRF_RTC2-&amp;gt;EVTENSET = RTC_EVTEN_COMPARE0_Msk;
        NRF_RTC2-&amp;gt;INTENSET = RTC_INTENSET_COMPARE0_Msk;
        // Get reference time
        m_rtc_reference_time = RTC2_GetCounterReg();
		
        // insert a timeout at reference time + obj-&amp;gt;Timestamp
        TimerInsertNewHeadTimer(obj); 
    }
	// Add obj to the list
	else 
	{
            elapsedTime = RTC2_GetTimerElapsedTime();
            obj-&amp;gt;Timestamp += elapsedTime;
  
            if (obj-&amp;gt;Timestamp &amp;lt; TimerListHead-&amp;gt;Timestamp)
            {
                TimerInsertNewHeadTimer(obj);
            }
            else
            {
                TimerInsertTimer(obj);
            }
	}
	
    CRITICAL_REGION_EXIT();
}

void TimerStop (TimerEvent_t *obj) 
{
    TimerEvent_t* prev = TimerListHead;
    TimerEvent_t* cur = TimerListHead;

    // List is empty or the Obj to stop does not exist 
    if ((TimerListHead == NULL) || (obj == NULL))
    {
        return;
    }
	
    CRITICAL_REGION_ENTER();

    // Stop the Head  
    if(TimerListHead == obj)                 
    {
        // The head is already running 
        if(TimerListHead-&amp;gt;IsRunning == true) 
        {    
            // If another obj is registered we switch to it
            if(TimerListHead-&amp;gt;Next != NULL)
            {
                TimerListHead-&amp;gt;IsRunning = false;
                TimerListHead = TimerListHead-&amp;gt;Next;
                TimerSetTimeout(TimerListHead);
            }
            // No other obj registered: we can disable interrupts
            else
            {
                // Disable RTC2 CC[0] interrupt
                NRF_RTC2-&amp;gt;EVTENSET = RTC_EVTEN_COMPARE0_Disabled;
                NRF_RTC2-&amp;gt;INTENSET = RTC_INTENSET_COMPARE0_Disabled;
                TimerListHead = NULL;
            }
        }
        // Stop the head before it is started
        else 
        {   
            if(TimerListHead-&amp;gt;Next != NULL)   
            {
                TimerListHead = TimerListHead-&amp;gt;Next;
            }
            else
            {
                TimerListHead = NULL;
            }
        }
    }
    // Stop an object within the list
    else 
    {      
        while (cur != NULL)
        {
            if(cur == obj)
            {
                if(cur-&amp;gt;Next != NULL)
                {
                    cur = cur-&amp;gt;Next;
                    prev-&amp;gt;Next = cur;
                }
                else
                {
                    cur = NULL;
                    prev-&amp;gt;Next = cur;
                }
                break;
            }
            else
            {
		prev = cur;
                cur = cur-&amp;gt;Next;
            }
        }   
    }
	
    CRITICAL_REGION_EXIT();
}  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t write this code, this is the sdk by insight for ISP4520.&lt;br /&gt;If I have the bug again, I will post a new message.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Valentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259233?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 07:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9f5d284-5d76-4799-a656-69c79b845572</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I have asked around a bit, this doesn&amp;#39;t make any sense no. Maybe the effect here is a slight difference in timing, and this change the behavior.&lt;/p&gt;
&lt;p&gt;Are you sure you don&amp;#39;t have any critical regions (sd_nvic_critical_region_enter()/_exit()) or disabling interrupts (_disable_irq()/_enable_irq()) anywhere in your project? This may cause the assert.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259232?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 15:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bb624ec-e71f-4405-81b0-65811da797d8</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;Hi, I have test to change all priority of my interruption and set the irq priority to 6 but nothing change... The bug is always here...&lt;br /&gt;I look for some informations about interruption with softdevice and after some random change, I haven&amp;#39;t the bug anymore but I don&amp;#39;t understand why… I change the value &lt;span style="background-color:#ffffff;"&gt;NRF_PWR_MGMT_CONFIG_FPU_SUPPORT_ENABLED to 0 and the bug disapear. I use the nrf_pwr_mgmt_run() to got in sleep mode but can you explain me why this resolve my problem ?&lt;br /&gt;Can I delete the preprocessor definition of FLOAT_ABI_HARD or not?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259231?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 08:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:107c8cdd-a510-453c-8340-ab335268e37d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Looking at the code this assert may occur if the softdevice overstayed its planned duration. This typically can occur if&amp;nbsp;application prevent softdevice execution by disable interrupts or having high priority application interrupts. Check out:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html"&gt;https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259230?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 11:49:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34bb4883-7297-41fb-9239-7b919fef8539</guid><dc:creator>Valentin</dc:creator><description>&lt;p&gt;I use the softdevice&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;s132_nrf52_7.0.1_softdevice&lt;/span&gt;.hex.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice assertion failed after some time of advertisment without event</title><link>https://devzone.nordicsemi.com/thread/259229?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 11:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47ec4495-e2c1-4b0e-86f0-883e9bd200f2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I need to know which softdevice variant and version, for instance is is S132v6.1.1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>