<?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 with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120144/softdevice-with-zephyr-scanning-extended-advertisement-packets-crash-the-application</link><description>Context 
 We are working on a project that implies advertising and scanning extended advertised packets. 
 details : 
 
 NRF52840 
 Zephyr SDK 17.0 
 Zephyr 4.0.99 
 NRF SDK v3.0.0-preview1 
 
 
 Issue description 
 Our application freeze after a few</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Apr 2025 06:35:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120144/softdevice-with-zephyr-scanning-extended-advertisement-packets-crash-the-application" /><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/531267?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 06:35:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ede00b22-4051-4ddb-b0ae-d4d9dc505d30</guid><dc:creator>joar@nofence</dc:creator><description>&lt;p class="" data-start="77" data-end="309"&gt;Great, thank you! That seems to have resolved the issue. Setting &lt;code data-start="142" data-end="160"&gt;CONFIG_COUNTER=n&lt;/code&gt; appears to prevent the SoftDevice from asserting in our application.&amp;nbsp;And yes, in general, just&amp;nbsp;enabling &lt;code data-start="226" data-end="244"&gt;CONFIG_COUNTER=y&lt;/code&gt; in the Bluetooth Central sample causes the SoftDevice to assert.&lt;/p&gt;
&lt;p class="" data-start="311" data-end="467"&gt;It might be beneficial to include a build-time warning or error when this configuration combination is detected, to help avoid similar issues in the future.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/531185?ContentTypeID=1</link><pubDate>Wed, 09 Apr 2025 12:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c25c393b-507d-464f-b17c-96eb22e1b30e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote userid="140894" url="~/f/nordic-q-a/120144/softdevice-with-zephyr-scanning-extended-advertisement-packets-crash-the-application/530444"]here are the .config and .dts file of our application.[/quote]
&lt;p&gt;We had a look again at these files, and we see these configs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_COUNTER=y
CONFIG_COUNTER_NRF_RTC=y
CONFIG_COUNTER_RTC_CUSTOM_TOP_SUPPORT=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could you try setting these to n , and see if that impacts the issue ?&lt;br /&gt;&lt;br /&gt;hypothesis: It could be that the&amp;nbsp;&lt;span data-teams="true"&gt;IRQ handler for MPSL were overwritten by this counter driver:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/eacfed3332af6f473c97b6888594ea9d74e0149f/drivers/counter/counter_nrfx_rtc.c#L696-L753"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/eacfed3332af6f473c97b6888594ea9d74e0149f/drivers/counter/counter_nrfx_rtc.c#L696-L753&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-teams="true"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/531029?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 12:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06274747-1805-47ea-a4e9-93716e99aa49</guid><dc:creator>joar@nofence</dc:creator><description>&lt;p&gt;I&amp;rsquo;ll give this a try tomorrow. In the meantime, if you&amp;rsquo;re able to share any additional documentation on SoftDevice error codes, it would be greatly appreciated. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/531024?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 12:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119f763c-3f34-4da7-aaf5-b6b407723505</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;We are not able to reproduce the issue.&lt;/p&gt;
[quote userid="140894" url="~/f/nordic-q-a/120144/softdevice-with-zephyr-scanning-extended-advertisement-packets-crash-the-application/529925"]Flashed the Bluetooth central example that you suggested an enabled&amp;nbsp;CONFIG_BT_EXT_ADV=y together with BLE logging over RTT. This example works, in other words I don&amp;#39;t see that we are crashing.[/quote]
&lt;p&gt;Since the scanner example works, then it&amp;nbsp;&lt;span data-teams="true"&gt;indicates that there is something in your application which makes it behave differently than&amp;nbsp;the simple scanning application, and triggers the issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-teams="true"&gt;Are you able to provide a stripped down example application which can reproduce the issue? Maybe this can be done by modifying the scanner sample ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/531012?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 11:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3cc3150-868d-45d3-88e3-00e07fdb1021</guid><dc:creator>joar@nofence</dc:creator><description>&lt;p class="" data-start="77" data-end="99"&gt;Hi Sigurd (@sigurdon),&lt;/p&gt;
&lt;p class="" data-start="101" data-end="148"&gt;Just checking in&amp;mdash;are there any updates on this?&lt;/p&gt;
&lt;p class="" data-start="150" data-end="320"&gt;Also, are the error codes from the closed-source SoftDevice documented anywhere?&lt;br data-start="230" data-end="233" /&gt; Specifically, do&amp;nbsp;we know where the &lt;em&gt;&lt;code data-start="269" data-end="303"&gt;SoftDevice Controller ASSERT: 50&lt;/code&gt;&lt;/em&gt; originates from?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/530444?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2025 11:59:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:594e2979-129a-42bf-8f66-dbb61910ce98</guid><dc:creator>erlendhestnes92</dc:creator><description>&lt;p&gt;Thanks for getting back, here are the .config and .dts file of our application.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Erlend&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/_5F00_dts_5F00_and_5F00_config.zip"&gt;devzone.nordicsemi.com/.../_5F00_dts_5F00_and_5F00_config.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/530421?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2025 10:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:996ffad0-09ba-4434-9142-c01584e85924</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Could you post the compiled .overlay and .config files for your application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/529925?ContentTypeID=1</link><pubDate>Tue, 01 Apr 2025 08:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fac9f63-a357-4743-b8a2-cff5be52fa7d</guid><dc:creator>erlendhestnes92</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;br /&gt;&lt;br /&gt;Thanks for the feedback and sorry for the late reply from our side. We also want to understand this issue better as setting the&amp;nbsp;&lt;span&gt;CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y seems to be a bit of magical solution to this problem as we&amp;#39;re afraid that something on our side is not correctly configured. I therefore now tried as you suggested:&lt;br /&gt;&lt;br /&gt;1) Flashed the Bluetooth central example that you suggested an enabled&amp;nbsp;CONFIG_BT_EXT_ADV=y together with BLE logging over RTT. This example works, in other words I don&amp;#39;t see that we are crashing. And for reference, using our application with CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=n makes our application crash in the same fashion as described above.&lt;br /&gt;&lt;br /&gt;2) We are not using the radio directly, only through the Bluetooth API. Neither are we RTC0 for something (it&amp;#39;s only set to okay in our DTS), nor are we knowingly interacting with clocks or disabling interrupts for long period of time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3) We are not doing anything with the clocks&lt;br /&gt;&lt;br /&gt;Do you have any more suggestions for us to try?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Erlend&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/529276?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 12:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8515ab68-1b0b-406f-8ebd-9aa5644a331d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span data-teams="true"&gt;The feedback from the&amp;nbsp;SoftDevice Controller team is that using&amp;nbsp;&lt;code&gt;CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y&lt;/code&gt; should really not affect this bug, but it is hinting towards that you maybe are managing clocks in a strange way.&lt;br /&gt;&lt;br /&gt;1) Could you provide a minimal sample which can reproduce the issue?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-teams="true"&gt;For example, can you reproduce the bug with &lt;a id="menur7q6e" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/bluetooth/central/src/main.c" href="https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/bluetooth/central/src/main.c" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/bluetooth/central/src/main.c&lt;/a&gt; with CONFIG_BT_EXT_ADV=y?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-teams="true"&gt;2) Are you doing anything else than scanning? E.g. are you using RTC0, using the radio directly somehow (apart from through the Bluetooth API),&amp;nbsp; interacting with clocks or disabling interrupts for a long period of time?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-teams="true"&gt;3) If&amp;nbsp;you are doing something with clocks in your app, could you post what you are doing?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/529205?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 07:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:304e8766-3533-40e4-aad0-537d567b22b2</guid><dc:creator>Paul from Nofence</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Thank you, but we&amp;nbsp;may have found the solution : adding&amp;nbsp;&lt;span&gt;CONFIG_MPSL_USE_EXTERNAL_CLOCK_CONTROL=y in the&amp;nbsp;prj.conf.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice with Zephyr : Scanning extended advertisement packets crash the application</title><link>https://devzone.nordicsemi.com/thread/529166?ContentTypeID=1</link><pubDate>Wed, 26 Mar 2025 23:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88abf8dc-1604-4397-98d9-7a72ba21b106</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m checking with our&amp;nbsp;&lt;span&gt;SoftDevice Controller team what the reason for these asserts could be.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>