<?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>Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102800/illegal-use-of-the-epsr-add-uart-to-the-5340-audio</link><description>I add uart2 and uart3 in 5340 audio demo. 
 It work ok. 
 But I want to add a cdc acm uart, which was solved in my previous question, and I successfully added it in an original 5340 audio demo. 
 Now, I just defined it in the hardware tree. 
 
 The program</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Sep 2023 13:43:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102800/illegal-use-of-the-epsr-add-uart-to-the-5340-audio" /><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/445433?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 13:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9eb6ca8-20f2-4606-83ff-8e0cbfcfdfca</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the delayed response,&lt;/p&gt;
&lt;p&gt;I have included the use of uart2 as you are using.&lt;/p&gt;
&lt;p&gt;Below is the code which I included (please note that uart2, and cdc-acm are defined as in the previous overlay):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//line added globally
const struct device *myuart2 = DEVICE_DT_GET(DT_NODELABEL(uart2));

//variables defined within main
uint8_t myuart2buffer[8]; size_t myuart2buflen = 8; 

//using the uart2 rx-enable as per the query
uart_rx_enable(myuart2, myuart2buffer, myuart2buflen, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I built and programmed the DK using following in the terminal:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;python .\tools\buildprog\buildprog.py -c both -b debug -d gateway -p&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And I could see the output on the putty terminal connected to the correct com port&lt;/p&gt;
&lt;p&gt;(screen capture after resetting the DK)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1694439759613v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/443997?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 07:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8bb1dcd-07ca-43b1-8547-212e9e01548f</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I explain the problem in detail: When I enable uart2, the error will appear. If I don&amp;#39;t enable it, cdc works normally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/443994?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 06:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a23be97-f5f8-4822-9ed1-722a8c72ecff</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Sorry for taking so long to reply, I was busy with other work in the meantime.&lt;/p&gt;
&lt;p&gt;Please check my question specifically, the error will only occur if the above uart initialization is performed.&lt;br /&gt;I used the overlay you provided and still the result didn&amp;#39;t change.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1693550526374v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/442369?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 15:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c131ebd0-9a62-4b18-bf4b-962a83dd5e78</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There might be some conflicts in your overlay.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Based on your input, I have modified and incorporated the overlay and I can see successful execution.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1692631459708v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Adding complete overlay for your reference&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;i2c1 {
	clock-frequency = &amp;lt; 0x61A80 &amp;gt;;
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;flash_controller{
	flash0: flash@0 {
		partitions {
			fsc_nvm_partition_prod: partition@f0000 {
				label = &amp;quot;fsc_nvm_prod&amp;quot;;
				reg = &amp;lt; 0xf0000 0x1000 &amp;gt;;
			};

			fsc_nvm_partition_db0: partition@f1000 {
				label = &amp;quot;fsc_nvm_db0&amp;quot;;
				reg = &amp;lt; 0xf1000 0x1000 &amp;gt;;
			};
			fsc_nvm_partition_db1: partition@f2000 {
				label = &amp;quot;fsc_nvm_db1&amp;quot;;
				reg = &amp;lt; 0xf2000 0x1000 &amp;gt;;
			};

			storage_partition: partition@fa000 {
				label = &amp;quot;storage&amp;quot;;
				reg = &amp;lt; 0xfa000 0x6000 &amp;gt;;
			};
		};
	};
};

//////////////////////////////////////////////
&amp;amp;uart2{
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};
&amp;amp;uart3{
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart3_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart3_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;	
};


&amp;amp;pinctrl {
	uart2_default: uart2_default {
		group1 { 
			psels = &amp;lt;NRF_PSEL(UART_RX, 1,8)&amp;gt;,
			&amp;lt;NRF_PSEL(UART_TX, 1, 9)&amp;gt;;
		};
	};
	uart2_sleep: uart2_sleep {
		group1 {			
			psels = &amp;lt;NRF_PSEL(UART_RX, 1,8)&amp;gt;,
			&amp;lt;NRF_PSEL(UART_TX, 1, 9)&amp;gt;;
			low-power-enable;
		};
	};

	uart3_default: uart3_default {
		group1 {			
			psels = &amp;lt;NRF_PSEL(UART_RX, 1,2)&amp;gt;,
			&amp;lt;NRF_PSEL(UART_TX, 1, 3)&amp;gt;;
		};
	};
	uart3_sleep: uart3_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_RX, 1,2)&amp;gt;,
			&amp;lt;NRF_PSEL(UART_TX, 1, 3)&amp;gt;;
			low-power-enable;
		};
	};

	i2s0_default: i2s0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(I2S_MCK, 0, 12)&amp;gt;;
			nordic,drive-mode = &amp;lt; 0x3 &amp;gt;;
		}; 
		group2 {
			psels = &amp;lt;NRF_PSEL(I2S_SDIN, 0, 13)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_SCK_M, 0, 14)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_LRCK_M, 0, 16)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_SDOUT, 0, 15)&amp;gt;;
		};
	};
	i2s0_sleep: i2s0_sleep {

		group1 {
			psels = &amp;lt;NRF_PSEL(I2S_MCK, 0, 12)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_SDIN, 0, 13)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_SCK_M, 0, 14)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_LRCK_M, 0, 16)&amp;gt;,
			&amp;lt;NRF_PSEL(I2S_SDOUT, 0, 15)&amp;gt;;
			low-power-enable;			
		}; 
	};
};

&amp;amp;zephyr_udc0 {
	cdc_acm_uart0 {
		compatible = &amp;quot;zephyr,cdc-acm-uart&amp;quot;;
	};
};
/////////////////////////////////////////&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/442188?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 02:03:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:084fd931-d54d-4c6f-b348-e5754ce5cd8e</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;There are some confidential fields in config, you may need to set the question as private to send&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/442113?ContentTypeID=1</link><pubDate>Fri, 18 Aug 2023 15:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7020b51-d1c1-479a-b676-5da21556083a</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Reskyllr, you did not send the prj.conf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/442110?ContentTypeID=1</link><pubDate>Fri, 18 Aug 2023 15:07:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94fc7cc4-49cd-473d-b74d-fcb1940988bb</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello Reskyllr,&lt;/p&gt;
&lt;p&gt;Is there any update at your end?&lt;/p&gt;
&lt;p&gt;I did not get much time to look at it, and also audio stuff is bit newer to me, so I will come back to you on Monday.&lt;/p&gt;
&lt;p&gt;BR, Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/441276?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 01:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61d57822-46b9-41d8-a8d6-974389ac6d97</guid><dc:creator>Reskyllr</dc:creator><description>&lt;p&gt;I am using ncs2.4 and an audio dk modified by myself.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7140.nrf5340_5F00_audio_5F00_dk_5F00_nrf5340_5F00_cpuapp.overlay"&gt;devzone.nordicsemi.com/.../7140.nrf5340_5F00_audio_5F00_dk_5F00_nrf5340_5F00_cpuapp.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that this is a custom development board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Illegal use of the EPSR,add uart to the 5340 audio</title><link>https://devzone.nordicsemi.com/thread/441116?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 10:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2006874-6496-4f9e-944c-bf8da96f9fa0</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello Reskyllr,&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;It can be that there is conflict of pins or configurations.&lt;/p&gt;
&lt;p&gt;Can you share your dts overlays and prj.config to look more?&lt;/p&gt;
&lt;p&gt;Which SDK you are using?&lt;/p&gt;
&lt;p&gt;As you are building for the nrf5340DK or the Audio DK?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>