<?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 toggle the ncs pin assigned to a slave in the DeviceTree.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112844/how-to-toggle-the-ncs-pin-assigned-to-a-slave-in-the-devicetree</link><description>Dear Support Team, 
 I&amp;#39;m trying to develop a mouse using Pixart&amp;#39;s PAW3395 sensor. I&amp;#39;ve written functions for reading and writing data through the SPI interface. I took help from the bme280 example provided by Zephyr and the Nordic Dev Academy. The overlay</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Jan 2025 16:42:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112844/how-to-toggle-the-ncs-pin-assigned-to-a-slave-in-the-devicetree" /><item><title>RE: How to toggle the ncs pin assigned to a slave in the DeviceTree.</title><link>https://devzone.nordicsemi.com/thread/517541?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 16:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:947e58d6-037b-43bc-b2e5-b0a1faa2e0d1</guid><dc:creator>ben241</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;I&amp;#39;m doing something similar but I have some issues.&amp;nbsp;Is the &amp;quot;power_up_init_reg()&amp;quot; function just writing the registries&amp;nbsp;following&amp;nbsp;the datasheet? At step 139, can you read 0x80 from the registry 0x6C? &lt;br /&gt;&lt;br /&gt;Thank you very much in advance for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to toggle the ncs pin assigned to a slave in the DeviceTree.</title><link>https://devzone.nordicsemi.com/thread/493336?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2024 08:57:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd4b9ad-734f-4379-8009-59506bf9b851</guid><dc:creator>HashSplash</dc:creator><description>&lt;p&gt;Thank you! Removing the CS pin from the SPI node entirely worked for me, and now I just lower the NCS pin manually whenever I need to read or write data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to toggle the ncs pin assigned to a slave in the DeviceTree.</title><link>https://devzone.nordicsemi.com/thread/493090?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 09:00:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1512f87-fa85-4a4c-9d14-e42ec04ec056</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;based on the overlay, you can obtain and drive the CS pin like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;const struct device *gpiodev =DEVICE_DT_GET(DT_NODELABEL(gpio0));
#define CSB_PIN 30

//and doing for example:
static int bme_read_reg(uint8_t reg, uint8_t *data, int size)
{
    //..
    gpio_pin_set(gpiodev, CSB_PIN, 1);
    //..
	gpio_pin_set(gpiodev, CSB_PIN, 0);
    //..
    
	return 0;
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>