<?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>Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107953/unable-to-get-spim-peripheral-to-use-csn-signal</link><description>Hello, 
 I want to combine multiple peripherals in a nrf53 using DPPI to one, complex peripheral. That&amp;#39;s why I directly program against the peripheral documentation and use the peripheral layout definitions from hal/nordic/nrfx/mdk/nrf5340_application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2024 16:20:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107953/unable-to-get-spim-peripheral-to-use-csn-signal" /><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467227?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 16:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b29b2dd3-bc99-426d-8de4-3d9989cb8fbb</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Ahhh, now I got it! :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467226?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 16:10:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:489043c0-bd23-43c2-8e10-581501e2a5d9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sounds good you solved it, just to explain this &amp;quot;Not supported&amp;quot;, the table list up everything that is not supported for that specific spi instance, which for instance include that it does not support higher than 8Mbps data rate and and hardware CSN control.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467180?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 13:42:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3738aefe-e93e-44ae-8f44-1954e7ec518c</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Ok, looks like I&amp;#39;ve solved that riddle on my own. In nrf5340_application_peripherals.h, I found the following hint:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SPIM0_FEATURE_HARDWARE_CSN_PRESENT  0
#define SPIM1_FEATURE_HARDWARE_CSN_PRESENT  0
#define SPIM2_FEATURE_HARDWARE_CSN_PRESENT  0
#define SPIM3_FEATURE_HARDWARE_CSN_PRESENT  0
#define SPIM4_FEATURE_HARDWARE_CSN_PRESENT  1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I just remembered, that I&amp;#39;ve read something in the documentation, I could not really make sense of: &amp;quot;Configuration:&amp;nbsp;Not supported: &amp;gt; 8&amp;quot;:&lt;/p&gt;
&lt;p&gt;&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/Bildschirmfoto-2024_2D00_02_2D00_01-um-14.37.38.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So, my guess would be, that the PDF generation tool used, can not cope with more than 8 unsupported peripheral features and bails out with that message (Not supported: &amp;gt; 8) and then simply prints some of the unsupported peripheral features. So it looks like, most (4 out of 5) SPIM peripheral do not implement the documented features.&lt;/p&gt;
&lt;p&gt;Stating the fact, that not all features are implemented by all peripherals would have saved me a lot of time. Using SPIM4 seams to do the trick.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Torsten&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467179?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 13:39:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ac98865-326b-4d92-afbc-bc97c9990c6e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately I don&amp;#39;t have time to look into the details here, but I would like to say that historically the CSN pin was not part of the SPI peripheral (and even when it was added, it first only only for a few of the internal SPI peripherals had this functionality), so CSN was (and is for many variants still) handled outside of the SPI driver. Since the driver is generic (and be used for all variants) it may not be very straight forward to get this working. Looking quickly at the nrfx spi api, I get the impression that&amp;nbsp;NRFX_SPIM_EXTENDED_ENABLED will add support for configuration of the CSN pin in the SPI peripheral. Alternativly calling&amp;nbsp;nrf_spim_csn_configure() during init of the spi driver.&lt;/p&gt;
&lt;p&gt;Regarding handling of&amp;nbsp;&lt;span&gt;STALLSTAT&amp;nbsp;register, there is no need to handle it really, it&amp;#39;s just a register saying if a stalled occured during last transfer (e.g. that it might have been a very short delay between 2 bytes), it&amp;#39;s not really useful unless you have extremely tight timing and just want to know there was possible delay during the latest transfer. It does not affect the data in any way (only the timing).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467057?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 07:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1564036b-d6e7-435b-babe-a6ffcbf47b4e</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Not till now ;-) Now, I&amp;#39;ve looked at it. It seems to not configure a Chip Select pin at all.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve read nrfx_spim.c and was surprised to see, that (in case the chips select pin is configured [which is not the case for the given example]) the chip select pin is manually set within `set_ss_pin_state()`. I&amp;#39;ve read the errata for the nrf53 and haven&amp;#39;t found anything that would apply.&lt;/p&gt;
&lt;p&gt;I would love to trigger a SPI transfer, using DPPI, which then implies, that the CS signal would have to be set by the peripheral. According to the documentation (V1.3.1) this should be possible.&lt;/p&gt;
&lt;p&gt;I also can not find any handling of the&amp;nbsp;&lt;span&gt;STALLSTAT register. I&amp;#39;ve tracked it down to `nrfy_spim_stallstat_rx_get()` but can not find any call to that function.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get SPIM peripheral to use CSN signal</title><link>https://devzone.nordicsemi.com/thread/467021?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 19:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d936d18-9020-4ec2-ad06-7fee34ad1d99</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you looked at the nrfx examples?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src"&gt;https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>