<?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>S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45424/s140-assertion-at-address-0x12cfa-when-connecting-to-device</link><description>Hi, 
 I&amp;#39;m having problems connecting to my device, because whenever I do so, the SoftDevice asserts at address 0x12CFA. 
 I use softdevice S140 v6.0.0 and SDK v15.0.0. 
 I initalize the system like it is done in examples/ble_peripheral/ble_app_hrs_freertos</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 May 2019 08:05:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45424/s140-assertion-at-address-0x12cfa-when-connecting-to-device" /><item><title>RE: S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/thread/184778?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54f34da2-d43d-490a-b85d-87e8ea0a9878</guid><dc:creator>denwil</dc:creator><description>&lt;p&gt;Could not agree more...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/thread/184777?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7921ac5-1c63-4efd-9c45-1f3d25225150</guid><dc:creator>Elkana</dc:creator><description>&lt;p&gt;I also noticed that this is related to Stack out of sync, and this is very disappointing:&lt;br /&gt;1.&amp;nbsp; In my opinion, Faults in BLE stack should not&amp;nbsp;automatically&amp;nbsp;reset the device,&amp;nbsp;but shutdown the BLE back to idle and tell the user about it.&lt;br /&gt;2. Since this is probably a very common error - The error could have been much more descriptive,&amp;nbsp;and save loads of debugging hours...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/thread/184770?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 07:50:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa5f9f51-cbe1-4d93-b030-2f8f0ad99205</guid><dc:creator>denwil</dc:creator><description>[quote userid="26273" url="~/f/nordic-q-a/45424/s140-assertion-at-address-0x12cfa-when-connecting-to-device/184693"]&amp;quot;FreeRTOS.h&amp;quot; -&amp;gt; &amp;quot;FreeRTOSConfig.h&amp;quot; -&amp;gt; &amp;quot;nrf_soc.h&amp;quot;[/quote]
&lt;p&gt;Ok, that works but not a very nice implicit include.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26273" url="~/f/nordic-q-a/45424/s140-assertion-at-address-0x12cfa-when-connecting-to-device/184693"]I have the same issue (SD assert with PC =&amp;nbsp;&lt;span&gt;0x12cfa) on nRF52840, and&amp;nbsp;&lt;/span&gt;&lt;span&gt;I don&amp;#39;t understand how&amp;nbsp;the SWI2 interrupt related to the Assertion, and how do you tell?&lt;/span&gt;[/quote]
&lt;p&gt;It didn&amp;#39;t directly relate to the interrupt issue, but was rather a side effect of debugging while the bluetooth stack is running. If the bluetooth stack notices that it is out of sync (e.g. when you are stepping through code with the debugger) it will assert there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/thread/184693?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 11:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:134cab8f-bd2b-44b6-bf25-8da41ed03008</guid><dc:creator>Elkana</dc:creator><description>&lt;p&gt;&lt;span&gt;The nrf_soc.h include is not required if SOFTDEVICE_PRESENT is defined, since it is already included: &amp;quot;FreeRTOS.h&amp;quot; -&amp;gt; &amp;quot;FreeRTOSConfig.h&amp;quot; -&amp;gt; &amp;quot;nrf_soc.h&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can&amp;nbsp;check preprocessor output and validate it replaces&amp;nbsp;SD_EVT_IRQHandler with&amp;nbsp;SWI2_EGU2_IRQHandler (so this is why it works). &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have the same issue (SD assert with PC =&amp;nbsp;&lt;span&gt;0x12cfa) on nRF52840, and&amp;nbsp;&lt;/span&gt;&lt;span&gt;I don&amp;#39;t understand how&amp;nbsp;the SWI2 interrupt related to the Assertion, and how do you tell?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140: Assertion at address 0x12CFA when connecting to device</title><link>https://devzone.nordicsemi.com/thread/178848?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 08:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa9354f-2565-42f5-aa26-a30aceea819e</guid><dc:creator>denwil</dc:creator><description>&lt;p&gt;Found the solution to this. Had to add this to nrf_sdh_freertos.c:&lt;/p&gt;
&lt;p&gt;#include &amp;quot;nrf_soc.h&amp;quot;&lt;/p&gt;
&lt;p&gt;This is needed for the linker to correctly override the default handler with SD_EVT_IRQHandler, since the nrf_soc.h defines SD_EVT_IRQHandler to SWI2_IRQHandler (or on nrf52840, SWI2_EGU2_IRQHandler). I do not know how it could have worked without that include.&lt;/p&gt;
&lt;p&gt;So the SoftDevice assert I was seeing was probably due to the debugger halting the processor, and then when stepping, the SoftDevice detected that timing was off and asserted. But it would be nice with some info on how to detect what errors the SoftDevice can assert on.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Dennis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>