<?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>nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107787/nrf5340-control-radio-peripheral-with-bluetooth-enabled</link><description>Hello! For my Master Thesis project I have a custom radio peripheral driver. As soon as I enable bluetooth with CONFIG_BT=y it suddenly starts crashing when I try to initialize my custom radio driver. If I am not wrong, BT must be enabled to enable softdevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Feb 2024 08:25:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107787/nrf5340-control-radio-peripheral-with-bluetooth-enabled" /><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/467304?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 08:25:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e373739-7056-4f21-a56e-257ec60dd21a</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;Thank you very much Jared!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/467201?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 14:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bae099c-820a-4fac-a654-1cc3f4343800</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No that is not possible.&lt;/p&gt;
&lt;p&gt;The assert that you&amp;#39;re getting is because you get a radio interrupt outside a timeslot. In short, if you want to use the radio with Softdevice controller enabled, then you have to use MPSL and timeslots,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;
&lt;p&gt;EDIT: I think bt_disable() will do the job to disable the softdevice but I still think you should use timeslots.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/467056?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 07:26:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f417d37e-4259-4201-ae44-7592dc531ea4</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;I see! Is it possible to disable SoftDevice manually during initialization, in the code?&lt;br /&gt;&lt;br /&gt;Yes, those lines that I mentioned before are my own lines for my radio driver. I am using NCS v2.1.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466757?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 12:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e87e8ae-5725-44ac-ae41-ea43e86ad013</guid><dc:creator>Jared</dc:creator><description>[quote user="rynze"]I am aware of TimeSlots on nRF52 and 51. There I can choose not to start the SoftDevice and use radio without Timeslot API and at the same time be able to call ECB via SVCALL. Is it different for nrf53?[/quote]
&lt;p&gt;Yes, the nRF5340 use Zephyr RTOS which will immediately initialize the Softdevice or Zephyr controller once CONFIG_BT=y is set in the project config. It&amp;#39;s not like in the nRF5SDK where you could choose to enable the Softdevice first when it&amp;#39;s used. You therefore have to use Timeslot through MPSL if you want access to the Radio peripheral when the CONFIG_BT=y.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="rynze"]&lt;p&gt;It seems like it crashes on these lines:&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/div&gt;[/quote]
&lt;p&gt;I assume that this are the added lines in your custom radio driver?&lt;/p&gt;
&lt;p&gt;Can you specify the NCS version that you&amp;#39;re using, and I&amp;#39;ll try to track down the root cause of the MPSL assert.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466565?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 15:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46aeff57-4498-4a45-919f-61c10216152b</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;This is on a development kit.&lt;br /&gt;&lt;br /&gt;Tomass&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466562?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 15:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8409dca5-5cc5-4040-9c3c-bbd811468722</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is this on a custom board or a development kit? If it&amp;#39;s on a custom board, can you specify the internal capacitance of the HFXO crystal and the size of the parallel load capacitors?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466250?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 14:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:583aaa74-9235-4df1-b6cd-778f0742bf06</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;Yes, I am setting CONFIG_BT=y, since it is needed to activate softdevice controller.&lt;br /&gt;&lt;br /&gt;Below is debug log from when it crashes:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build cbe3b8fe8b05  ***g system
Main nrf5340dk_nrf5340_cpunet
Initializing radio hardware
[00:00:00.010,101] &amp;lt;err&amp;gt; mpsl_init: MPSL ASSERT: 112, 2183
[00:00:00.010,101] &amp;lt;err&amp;gt; os: ***** HARD FAULT *****
[00:00:00.010,131] &amp;lt;err&amp;gt; os:   Fault escalation (see below)
[00:00:00.010,131] &amp;lt;err&amp;gt; os: ARCH_EXCEPT with reason 3

[00:00:00.010,162] &amp;lt;err&amp;gt; os: r0/a1:  0x00000003  r1/a2:  0x00000001  r2/a3:  0x00000000
[00:00:00.010,162] &amp;lt;err&amp;gt; os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x010192ef
[00:00:00.010,192] &amp;lt;err&amp;gt; os:  xpsr:  0x69000018
[00:00:00.010,192] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x01016458
[00:00:00.010,223] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:00.010,223] &amp;lt;err&amp;gt; os: Fault during interrupt handling

[00:00:00.010,253] &amp;lt;err&amp;gt; os: Current thread: 0x21002038 (unknown)
*** Booting Zephyr OS build cbe3b8fe8b05  ***ng system
Main nrf5340dk_nrf5340_cpunet
Initializing radio hardware&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466243?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 13:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a46898b-97c7-42a1-90ec-5398d2543779</guid><dc:creator>Jared</dc:creator><description>[quote user="rynze"]I am assuming that it should be OK to run radio without timeslot API if nor BT nor softdevice are initiated, or am I wrong?[/quote]
&lt;p&gt;No you&amp;#39;re correct. But you are setting CONFIG_BT=y in the project config right?&lt;/p&gt;
[quote user="rynze"]No, it crashes silently and restarts the core.[/quote]
&lt;p&gt;Can you try to build your application with debug optimizations and see if the log is outputting any error log?&lt;/p&gt;
&lt;p&gt;regards&lt;br /&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466238?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 13:33:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41d1d8cb-926a-471f-852d-477a06ce127d</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;No, it crashes silently and restarts the core.&lt;br /&gt;I am assuming that it should be OK to run radio without timeslot API if nor BT nor softdevice are initiated, or am I wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466232?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 13:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ae1a696-bf50-4a31-b798-053267b25db2</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is any log printed out when it crashes? Any specific error reported on the log?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466179?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 10:01:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa6bd3c-23bb-44c5-a097-57ab5c891c10</guid><dc:creator>rynze</dc:creator><description>&lt;p&gt;It seems like it crashes on these lines:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART    = 1;&lt;/pre&gt;&lt;br /&gt;I am aware of TimeSlots on nRF52 and 51. There I can choose not to start the SoftDevice and use radio without Timeslot API and at the same time be able to call ECB via SVCALL. Is it different for nrf53?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 control radio peripheral with Bluetooth enabled</title><link>https://devzone.nordicsemi.com/thread/466175?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 09:55:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75675bd9-ba74-4d30-b645-4927c7ffc85f</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] As soon as I enable bluetooth with CONFIG_BT=y it suddenly starts crashing when I try to initialize my custom radio driver.[/quote]
&lt;p&gt;Can you share the code where you try to initialize your custom driver, what exactly is it doing?&lt;/p&gt;
&lt;p&gt;When the Softdevice controller has been enabled, then the Radio and some other peripherals will be restricted and only accessible for the application through Timeslot and the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/README.html#mpsl"&gt;MPSL &lt;/a&gt;interface,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>