<?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>nrfx spi using external gpio controller for CS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107074/nrfx-spi-using-external-gpio-controller-for-cs</link><description>Hi, 
 I have an nrf52840 project running ncs 2.5.0 
 I have spi devices, and the CS pin is not in the main nrf gpio controller, but on an I2C powered IO expander. 
 There is no problem to add the CS in the device tree: 
 ``` 
 &amp;amp;spi1 { compatible = &amp;quot;nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jan 2024 10:18:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107074/nrfx-spi-using-external-gpio-controller-for-cs" /><item><title>RE: nrfx spi using external gpio controller for CS</title><link>https://devzone.nordicsemi.com/thread/463497?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 10:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ff58a32-8ef0-435f-99b0-678e6a2c5054</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;You welcome. The best of luck with your project &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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfx spi using external gpio controller for CS</title><link>https://devzone.nordicsemi.com/thread/463022?ContentTypeID=1</link><pubDate>Sun, 07 Jan 2024 07:08:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b5085d-5d16-4765-a884-cb24a8662f11</guid><dc:creator>Moran</dc:creator><description>&lt;p&gt;That&amp;#39;s great! I will use it for now. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfx spi using external gpio controller for CS</title><link>https://devzone.nordicsemi.com/thread/462867?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 12:04:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff81099-67ce-4f49-a55d-03c85d8adde8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately there is no good workaround for this issue at the moment. The only workaround I can think of is to handle chip select manually from the application, rather than have the driver set it for you. This would only work if you use the SPI driver directly though, it won&amp;#39;t work if the SPI driver is interfaced through some other higher level library or driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of the developers proposed a fix to this issue, and created a PR which you can have a look at &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/67241"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could try to patch this in manually and see if it solves it. Patching SDK files directly is not ideal either, but it might be the lesser of two evils in this case (and would be a temporary fix until the PR is merged into an SDK release).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>