<?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>How to reduce spi chipselect to sclk delay</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90197/how-to-reduce-spi-chipselect-to-sclk-delay</link><description>I am trying to implement spi in my project and have encountered an issue where the delay from chipselect to sclk is around 10 us which should be as low as 1us according to the nrf5340 datasheet and the slave device I am communicating with can have this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jul 2022 09:09:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90197/how-to-reduce-spi-chipselect-to-sclk-delay" /><item><title>RE: How to reduce spi chipselect to sclk delay</title><link>https://devzone.nordicsemi.com/thread/378653?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 09:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0436af93-64d8-4da1-be36-e426006c2486</guid><dc:creator>Abdullah Zaman</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;br /&gt;&lt;br /&gt;I was able to resolve this issue by using nrfx driver and spi instance 4. Thanks for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce spi chipselect to sclk delay</title><link>https://devzone.nordicsemi.com/thread/377853?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 12:18:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e17969af-8195-407a-a878-3981c826f35e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I do remember I looked into this some time ago, and found the same. There is a delay between CSN to CLK, and it&amp;#39;s just due to the way it&amp;#39;s implemented when being used by zephyr. In general though having a delay of ~5-10us can be a good idea, since some peers also need to wakeup before they can receive data.&lt;/p&gt;
&lt;p&gt;That said though, if you want to reduce this time, then the best (or only way) would be to look at using SPIM instance 4, which have CSNDUR register that can control this timing:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/spim.html#topic"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/spim.html#topic&lt;/a&gt;&amp;nbsp;It&amp;#39;s only SPIM instance 4 that support direct control over CSN pin directly be the SPIM perpiheral.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>