<?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>NCS - Devicetree &amp;amp; nrfx coexistence</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116830/ncs---devicetree-nrfx-coexistence</link><description>Hi, 
 
 I have an application based on the &amp;quot;peripheral_uart&amp;quot; sample code (nRF52840DK, NCS2.70) 
 As I use interchangeably the same pins as GPIOs and UARTE1, I use UARTE1 with NRFX drivers: 
 
 
 nrfx_uarte_t uarte1_inst = NRFX_UARTE_INSTANCE ( 1 ) 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2024 08:09:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116830/ncs---devicetree-nrfx-coexistence" /><item><title>RE: NCS - Devicetree &amp; nrfx coexistence</title><link>https://devzone.nordicsemi.com/thread/513117?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 08:09:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44d90785-16bb-48d6-9f58-46fdc8a186dc</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Oh, I see.&lt;/p&gt;
&lt;p&gt;Glad you found a solution that worked for you, and thanks for sharing it in case anyone else runs into the same problem &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS - Devicetree &amp; nrfx coexistence</title><link>https://devzone.nordicsemi.com/thread/513043?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 16:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc41b950-8c4d-4f9d-af09-2570c1e6b7f8</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/elfving"&gt;Elfving&lt;/a&gt;&amp;nbsp; for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The answer lies in this post - &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108823/turning-on-twim-twis-without-devicetree"&gt;Turning on TWIM/TWIS without devicetree&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in short -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add the following to app.overlay &lt;br /&gt;
&lt;div style="background-color:#282a36;color:#f8f8f2;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#ff79c6;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#50fa7b;font-style:italic;"&gt;i2c0&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#f0f0f0;"&gt;status&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#ff79c6;"&gt;=&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#8be9fd;"&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#f0f0f0;"&gt;compatible&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#ff79c6;"&gt;=&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#8be9fd;"&gt;&amp;quot;nordic,nrf-twim&amp;quot;&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt;; // this is the secret (apparently)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#ff79c6;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#50fa7b;font-style:italic;"&gt;i2c1&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#f0f0f0;"&gt;status&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#ff79c6;"&gt;=&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#8be9fd;"&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#f0f0f0;"&gt;compatible&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#ff79c6;"&gt;=&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#8be9fd;"&gt;&amp;quot;nordic,nrf-twim&amp;quot;&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#f8f8f2;"&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;add the following to prj.conf&lt;br /&gt;
&lt;div style="background-color:#282a36;color:#f8f8f2;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#ff79c6;"&gt;CONFIG_I2C=&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt;y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS - Devicetree &amp; nrfx coexistence</title><link>https://devzone.nordicsemi.com/thread/513019?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 15:04:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25719eb3-dfbe-4ea7-bd8f-c839cd47af1f</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;Eyelasko,&lt;/p&gt;
[quote user=""]&lt;p&gt;As I use interchangeably the same pins as GPIOs and UARTE1, I use UARTE1 with NRFX drivers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div style="background-color:rgba(40, 42, 54, 1);color:rgba(248, 248, 242, 1);font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;So if I understand you correctly, you want to use nrfx because you want to programmatically change when you use the same pins for multiple different peripherals?&lt;/p&gt;
&lt;p&gt;I have to say also that creating a pure nrfx project without dts is not recommended. NCS relies on Zephyr, which is heavily dependent on dts. Disabling a few specific peripherals in order to take control with nrfx however is considered fine.&lt;/p&gt;
[quote user=""]What should I do if I want to use NRFX peripherals that ARE defined in the default dts file (specifically - TWIM0 &amp;amp; TWIM1)&lt;br /&gt;[/quote]
&lt;p&gt;I believe you would have to change the dts to disable these peripherals, so that nrfx can take control of them directly. Ie. something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c0 {
    status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;i2c1 {
    status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>