<?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>Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98030/radio-test-and-bt-exlusive-coexistense-in-same-firmware-image</link><description>Hi, 
 First I like to share some background. We have a normal BLE application, which is made in nRF Connect and for nRF52833. We like to have radio test functionality and BLE functionality in the same firmware image. It doesn&amp;#39;t mean that BLE functionality</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Mar 2023 09:25:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98030/radio-test-and-bt-exlusive-coexistense-in-same-firmware-image" /><item><title>RE: Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/thread/417610?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 09:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3055eae-4ac3-427d-b204-1a87c81fedc7</guid><dc:creator>Taavi Jantson</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;That is exactly what was needed.&lt;/p&gt;
&lt;p&gt;I have verified that no more crashes for the radio test example.&lt;/p&gt;
&lt;p&gt;Note for future users! Quite the latest nRF SDK is required to use this solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/thread/417415?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 12:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386030e2-549b-4e1a-a823-924d55c43312</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The peripherals seems to be owned at mpsl_init which is at the system startup. CONFIG_BT=y seems to translate to mpsl owership of these restricted peripherals.&lt;/p&gt;
&lt;p&gt;Please add below in your proj.conf&lt;/p&gt;
&lt;p&gt;DYNAMIC_DIRECT_INTERRUPTS=y&lt;br /&gt;&lt;span&gt;MPSL_DYNAMIC_INTERRUPTS=y&lt;br /&gt;&lt;br /&gt;and uninitalize mpsl in your radio test initialization after the clock is configured as below&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	err = mpsl_lib_uninit();
	if (err) {
		printk(&amp;quot;Unable to uninit MPSL\n&amp;quot;);
		return;
	}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This will remove the controller&amp;#39;s ownership of those peripherals.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/thread/417409?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 12:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0466df69-75a1-43fc-bc27-4a9c5f5c9133</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Taavi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can reproduce the restart when enabling CONFIG_BT=y. At this point it does not look like this is due to writing to RADIO registers. Most likely a stack corruption. I haven&amp;#39;t figured that out yet. But I am asking the softdevice controller team as to when the controller takes ownership of the peripherals exactly. Will be back to you when I have more info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/thread/417024?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 11:24:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:235a8491-9417-4352-8fa4-141504fcab18</guid><dc:creator>Taavi Jantson</dc:creator><description>&lt;p&gt;You can very easily reproduce the issue by taking the radio test example &amp;#39;nrf\samples\peripheral\radio_test&amp;#39;, adding&amp;nbsp;CONFIG_BT=y to the configuration and executing the command &amp;#39;start_tx_modulated_carrier&amp;#39; from the command line.&lt;/p&gt;
&lt;p&gt;The first problem you will notice is that the function&amp;nbsp;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;rnd8&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;) will never return as the event doesn&amp;#39;t get active. This random number generation can be replaced by something else and is not important right now. So to continue I just replaced this with the standard lib rand() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Next, you should observe the not intended system reset after the function&amp;nbsp;nrf_radio_task_trigger(NRF_RADIO, NRF_RADIO_TASK_TXEN) gets called.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For some reason, the radio test example gives just plain system reset and in my product application I get&amp;nbsp;MPSL ASSERT, but still, both are bad.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0333.radio_5F00_test.zip"&gt;devzone.nordicsemi.com/.../0333.radio_5F00_test.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test and BT exlusive coexistense in same firmware image</title><link>https://devzone.nordicsemi.com/thread/417017?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 10:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a1775a6-c82b-429a-9eae-e29a28db9102</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I was assuming that nothing is owned by the softdevice controller before ble is enabled, but I am not 100% sure about this.&lt;/p&gt;
&lt;p&gt;Can you attach your project here so that I can test what causes this hardfault?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>