<?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 Sub node configuration using NRFX/SPIM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83120/spi-sub-node-configuration-using-nrfx-spim</link><description>I finally had success in getting a SPIM master running with a single SPI slave (Honeywell sensor running CS 4 on the Arduino R3 header) on my nRF9160DK. But now I need to add a second SPI slave device (a Crystalfontz LCD) and I need to control the CS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Dec 2021 11:06:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83120/spi-sub-node-configuration-using-nrfx-spim" /><item><title>RE: SPI Sub node configuration using NRFX/SPIM</title><link>https://devzone.nordicsemi.com/thread/345089?ContentTypeID=1</link><pubDate>Mon, 27 Dec 2021 11:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8427e292-7e21-4aa2-85c9-3dea5792d24b</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;To declare more than one cs-gpios, you should define it similar to this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L134"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L134&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And you want to fetch index 1 via this call instead:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/include/devicetree/gpio.h#L93"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/include/devicetree/gpio.h#L93&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is because the macro that you use at this moment always assumes index 0:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/include/devicetree/gpio.h#L113-L114"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/include/devicetree/gpio.h#L113-L114&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&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></channel></rss>