<?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>SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59943/spi-master-example-fix</link><description>Hello, 
 i built a SPI Master example based on this: SPI Master example 
 The example is a bit outdated and needed some rework and fix to work. I don&amp;#39;t know if i am missing something, but SES complains and refuse to open the example because of some lack</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Sep 2020 13:13:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59943/spi-master-example-fix" /><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/270609?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 13:13:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:345754ea-02e9-40b0-bdec-199ab8bcb8ab</guid><dc:creator>spline_pete</dc:creator><description>&lt;p&gt;Ok, thanks. See this post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66111/asset-tracker---adding-spi-sensor"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/66111/asset-tracker---adding-spi-sensor&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/270473?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 07:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7be199ca-d073-4e51-955d-6a25ee593d9f</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Hi Pete,&lt;/p&gt;
&lt;p&gt;i cannot share with you the full project, but i can try to provide some help if you tell me where you&amp;#39;re stuck or what the errors are&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/270392?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 17:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a1253a-a949-4b27-8a5b-ddc789ced124</guid><dc:creator>spline_pete</dc:creator><description>&lt;p&gt;I am struggling with SPI on the nRF9160 with Zephyr and an LIS2DW12.&amp;nbsp; Can you share your full project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/244650?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 09:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db41551f-ca40-4fd7-b8c8-eb9a6c42e5d5</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thanks for the detailed answer.&lt;/p&gt;
&lt;p&gt;I think it&amp;#39;s perfectly clear now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/244390?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 10:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d37af3ec-ac01-429b-9878-95c7e426cd83</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for the delayed answer. It has been Easter vacation period here in Norway.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for sharing. The SPI sample is currently out-dated, and it is correct; the ss-pin property does not exist, unfortunately.&lt;/p&gt;
&lt;p&gt;Most driver implementations has its own property for SS pin, as this is essentially a GPIO output that is set/cleared (SPIM doesn&amp;#39;t have a dedicated hardware CSN/SS pin). The nrfx_spim driver itself supports handling the SS pin, but this is disabled for the zephyr SPI port layer:&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/drivers/spi/spi_nrfx_spim.c#L411"&gt;https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/drivers/spi/spi_nrfx_spim.c#L411&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Having one SS pin for a driver only makes sense when you have one sensor that you&amp;#39;re communicating with, but when adding more sensors, you want to add more SS-pins and the handling would shift towards the sensor driver instead.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding atomic operations, these are more towards manipulating a variable without being interrupted, as explained in the documentation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/reference/kernel/other/atomic.html"&gt;https://docs.zephyrproject.org/latest/reference/kernel/other/atomic.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To disable/enable interrupts, this is the section you want to look at:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/reference/kernel/other/interrupts.html?interrupt#c.irq_lock"&gt;https://docs.zephyrproject.org/latest/reference/kernel/other/interrupts.html?interrupt#c.irq_lock&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Example Fix</title><link>https://devzone.nordicsemi.com/thread/243920?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 14:05:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34577441-7044-4298-8de5-c44cb043bf28</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;I want to add a question about SPI. I would like to make SPIwrite and SPIread operations to be atomic so that interrupt are disabled during SPI transactions. Is it possible?&lt;/p&gt;
&lt;p&gt;I saw that atomic operations are supported in Zephyr using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_ATOMIC_OPERATIONS_BUILTIN=y
CONFIG_ATOMIC_OPERATIONS_C=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Does the nrf9160 support this? Do you have any suggestion to implement atomic block for SPI transactions?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Frax&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>