<?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>unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27270/unexpected-swi-during-softdevice-startup</link><description>We are using a custom board with softdevice S132, sdk14, and freertos and ana nrf52832. 
 Our ble_app does: 
 
 init gpio put up a splash screen via a display on spi 
 initializes twi and does writes to it to turn on an led via a gpio expander 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Mar 2021 16:31:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27270/unexpected-swi-during-softdevice-startup" /><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/301276?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 16:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94efe9fb-1f88-45b9-94fb-d28897eebff5</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;I use a merged firmware that contains the&amp;nbsp;app + bootloader + bootloader settings page + soft device.&lt;/p&gt;
&lt;p&gt;Maybe it happens only after I flash this signed, merged firmware with nrfutil. After this flashing,&amp;nbsp;the first boot (or at least&amp;nbsp;by the time the firmware app starts) is unusually slow (3-4 seconds).&lt;/p&gt;
&lt;p&gt;I think the error does not occur after the consequent boots.&lt;/p&gt;
&lt;p&gt;So maybe the bootloader cause the error at the first run, but why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/301272?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 16:03:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f96040ea-1c7c-485b-af74-4749ab808249</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I also experienced this error on my custom board with nrf52832, sdk16.&lt;/p&gt;
&lt;p&gt;The stack trace:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Thread [1] (Suspended: Breakpoint hit.)	
	11 app_error_handler() app_error_handler_gcc.c:49 0x0003ef46	
	10 assert_nrf_callback() b_le.c:226 0x0002add0	
	9 vTaskNotifyGiveFromISR() tasks.c:4796 0x00038642	
	8 SWI2_EGU2_IRQHandler() nrf_sdh_freertos.c:35 0x0005258c	
	7 &amp;lt;signal handler called&amp;gt;()  0xfffffff9	
	6 memset()  0x00052c7a	
	5 prvInitialiseNewTask() tasks.c:853 0x00036f3e	
	4 xTaskCreate() tasks.c:808 0x00036f02	
	3 nrf_sdh_freertos_init() nrf_sdh_freertos.c:68 0x00052640	
	2 bleInit() b_le.c:2793 0x0002e75c	
	1 main() main.c:210 0x00026606	
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is occured on the first power on reset, but not after software reset (NVIC_SystemReset()).&lt;/p&gt;
&lt;p&gt;I also noticed that maybe the error doesn&amp;#39;t appear after every compiling.&lt;/p&gt;
&lt;p&gt;Did anyone figure out the cause of the error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/107666?ContentTypeID=1</link><pubDate>Thu, 30 Nov 2017 20:16:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:650484d4-4a1f-4899-9a0c-79c9ca9479af</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Terry, did you solve this issue? if so, please update this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/107665?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 09:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bce9d41c-60d1-478c-8e9a-15313d3b279f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;please help me reproduce this problem on a DK. I will debug this and give you a workaround if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/107664?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2017 16:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35c27318-6975-4745-8009-166dacad547d</guid><dc:creator>Terry</dc:creator><description>&lt;p&gt;This change did not fix the problem.  Still dies after SWI at tasks.c line 4309:  xTaskToNotify is 0.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	Thread #1 57005 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)	
		vTaskNotifyGiveFromISR() at tasks.c:4,309 0x264de	
		SWI2_EGU2_IRQHandler() at nrf_sdh_freertos.c:65 0x282d0	
		&amp;lt;signal handler called&amp;gt;() at 0xfffffff9	
		memset() at 0x39d44	
		prvAllocateTCBAndStack() at tasks.c:3,136 0x2611e	
		xTaskGenericCreate() at tasks.c:562 0x2555e	
		nrf_sdh_freertos_init() at nrf_sdh_freertos.c:98 0x28352	
		ble_init() at task_ble.c:128 0x23b92	
		main() at main.c:63 0x39a0e
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unexpected SWI during softdevice startup</title><link>https://devzone.nordicsemi.com/thread/107663?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 11:39:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c1a2782-4fff-43d7-a397-9ba2d38b8ab9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;We found a bug that we fixed in SDK14.1&lt;/p&gt;
&lt;p&gt;Please replace the function&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* This function gets events from the SoftDevice and processes them. */
static void softdevice_task(void * pvParameter)
{
    NRF_LOG_DEBUG(&amp;quot;Enter softdevice_task.&amp;quot;);

    if (m_task_hook != NULL)
    {
        m_task_hook(pvParameter);
    }

    while (true)
    {
        (void) ulTaskNotifyTake(pdTRUE,         /* Clear the notification value before exiting (equivalent to the binary semaphore). */
                                portMAX_DELAY); /* Block indefinitely (INCLUDE_vTaskSuspend has to be enabled).*/
        nrf_sdh_evts_poll();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* This function gets events from the SoftDevice and processes them. */
static void softdevice_task(void * pvParameter)
{
    NRF_LOG_DEBUG(&amp;quot;Enter softdevice_task.&amp;quot;);

    if (m_task_hook != NULL)
    {
        m_task_hook(pvParameter);
    }

    while (true)
    {
        nrf_sdh_evts_poll();

        (void) ulTaskNotifyTake(pdTRUE,         /* Clear the notification value before exiting (equivalent to the binary semaphore). */
                                portMAX_DELAY); /* Block indefinitely (INCLUDE_vTaskSuspend has to be enabled).*/
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There was a deadlock in the way we locked ourself in the ulTaskNotify. Now we will first poll for the events that already happened before the softdevice_task was created before suspending.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>