<?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>Using NRFX SPIM and Zephyr SPI API&amp;#39;s simultaneously</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122912/using-nrfx-spim-and-zephyr-spi-api-s-simultaneously</link><description>Hi - I am seeking clarification on a topic as I am a little unsure on the correct way to do things. 
 I&amp;#39;m using an nRF52840 and porting an old Firmware from nRF5 SDK to NCS. 
 One SPI is used in a very simple and standard way. Another SPI is used via</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jul 2025 07:10:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122912/using-nrfx-spim-and-zephyr-spi-api-s-simultaneously" /><item><title>RE: Using NRFX SPIM and Zephyr SPI API's simultaneously</title><link>https://devzone.nordicsemi.com/thread/542606?ContentTypeID=1</link><pubDate>Wed, 16 Jul 2025 07:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7884ede-2460-4a25-9197-5977a7fafd62</guid><dc:creator>matthazley</dc:creator><description>&lt;p&gt;Thanks for clarifying things - we&amp;#39;ll try this.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NRFX SPIM and Zephyr SPI API's simultaneously</title><link>https://devzone.nordicsemi.com/thread/542371?ContentTypeID=1</link><pubDate>Mon, 14 Jul 2025 11:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c98e4d3e-4184-4bc3-aba7-5e3c42ece04e</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;You should be able to use them simultaneously, provided you use separate SPI instances for both and you do not try to use both APIs on the same hardware instance at the same time. .&lt;/p&gt;
&lt;p&gt;You see the status disabled for the&amp;nbsp;&lt;span&gt;&amp;nbsp;SPI instance you want to use with the nrfx driver&amp;nbsp;because we don&amp;#39;t want&amp;nbsp;Zephyr to initialize and claim that peripheral. Though status is disabled, you still specify the pins so your application can retrieve them from the devicetree. This i what is shown in the nrfx_prs sample that you mentioned.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So use&amp;nbsp;Zephyr API for one SPI instance (which is enabled in devicetree). And use nrfx API for another SPI instance (disabled in devicetree, but pins specified).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now, in the sample that you linked, it uses&amp;nbsp;IRQ_CONNECT to connect the interrupt to the nrfx handler. This is necessary for the nrfx driver to function correctly:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1752492402074v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Some peripherals (e.g., SPIM2, UARTE2) share the same interrupt line. Zephyr can&amp;#39;t manage this dynamically, so nrfx_prs lets multiple NRFX drivers safely share an IRQ.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>