<?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>Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90945/is-there-a-problem-with-spi-communication-of-ncs1-9-0-sdk</link><description>I used to use the ncs1.2.0 SDK to develop a product for customers. Now I am porting it to the ncs1.9.0 SDK. During the adaptation process, I find that its control over SPI is very different from that before. When the 1.2.0 version of SPI communicates</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Aug 2022 08:18:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90945/is-there-a-problem-with-spi-communication-of-ncs1-9-0-sdk" /><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/383408?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 08:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:988ac81b-cacd-4cd4-a0f9-de440b42d571</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Have you tried setting spi_cfg.cs_active_high = 0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/383374?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 03:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddf27430-b3d7-46e0-acdd-69fad00786df</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;No matter I put&amp;nbsp;gpio_dt_flags set to GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW, the waveforms I see from the logic analyzer are all high-level, which is very strange. like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void LCD_SPI_Init(void)
{
	spi_lcd = device_get_binding(LCD_DEV);
	if(!spi_lcd) 
	{
		return;
	}

	spi_cfg.operation = SPI_OP_MODE_MASTER | SPI_WORD_SET(8);
	spi_cfg.frequency = 8000000;
	spi_cfg.slave = 0;

	spi_cs_ctr.gpio_dev = device_get_binding(LCD_PORT);
	if(!spi_cs_ctr.gpio_dev)
	{
		return;
	}

	spi_cs_ctr.gpio_pin = CS;
	spi_cs_ctr.delay = 0U;
	spi_cs_ctr.gpio_dt_flags = GPIO_ACTIVE_LOW;//GPIO_ACTIVE_HIGH
	spi_cfg.cs = &amp;amp;spi_cs_ctr;	
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/QQ_FE564772_20220826113905.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/381518?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 09:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb556bd2-d8d8-4d3f-a78f-74a3db5fbf0f</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;I believe you should get active low by setting cs_active_high to 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/381516?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 09:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b823b2e9-ea39-4ba7-9b62-1d4bd925dc24</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;Yes, I see SPI_ CS_ ACTIVE_ High is the setting item, but what I need is that the CS signal is effective at low level. I don&amp;#39;t see SPI_ CS_ ACTIVE_ Low this option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/381480?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 08:00:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:598c417d-00c9-4b80-a5c0-f1ab2e0d5a8e</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;I can&amp;#39;t see that you&amp;#39;ve set the CS polarity, so you should try doing that.&lt;/p&gt;
&lt;p&gt;How is your spi_cfg struct defined?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/381456?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 05:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:475ded5f-8dc1-41ea-a1ec-8f7825c3dd4e</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;Hi, this is my spi cpnfiguration:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void LCD_SPI_Init(void)
{
	spi_lcd = device_get_binding(LCD_DEV);
	if(!spi_lcd) 
	{
		printk(&amp;quot;Could not get %s device\n&amp;quot;, LCD_DEV);
		return;
	}

	spi_cfg.operation = SPI_OP_MODE_MASTER | SPI_WORD_SET(8);
	spi_cfg.frequency = 8000000;
	spi_cfg.slave = 0;

	spi_cs_ctr.gpio_dev = device_get_binding(LCD_PORT);
	if (!spi_cs_ctr.gpio_dev)
	{
		printk(&amp;quot;Unable to get GPIO SPI CS device\n&amp;quot;);
		return;
	}

	spi_cs_ctr.gpio_pin = CS;
	spi_cs_ctr.delay = 0U;
	spi_cfg.cs = &amp;amp;spi_cs_ctr;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a problem with SPI communication of ncs1.9.0 SDK?</title><link>https://devzone.nordicsemi.com/thread/381342?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 11:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a209258-6d1e-42ab-a0f8-8a6f8d1ae26b</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;You should be able to set the CS polarity in your SPI configuration:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/spi.html#c.spi_config"&gt;http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/spi.html#c.spi_config&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What does your current SPI configuration look like?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>