<?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>SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100924/spis-on-nrf52840</link><description>I&amp;#39;ve been struggling bringing up a working SPIS test application and would appreciate any help I can get. I&amp;#39;m much more of a HW person, so this hyper abstracted Zephyr stuff is not easy for me. 
 First Question: 
 In my overlay (see below) for the reg</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jul 2023 15:05:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100924/spis-on-nrf52840" /><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/435790?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2023 15:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:443a4ff1-b051-445e-9799-2c0bf95b8711</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;Since there are a number of people subscribed to this ticket, I will document this issue and what fixed it. &amp;nbsp;Then wrap up with some other comments.&lt;/p&gt;
&lt;p&gt;The first two things that caused me issues were that the SPI samples I was finding were using the GPIOS definitions for the CS line. &amp;nbsp;In SPIS, that is not allowed. &amp;nbsp;Tracing back the -EINVAL error (and properly enabling the logged message) was the trick to figuring out this first step. &amp;nbsp;(You can see the result of this and the &amp;#39;fix&amp;#39; above).&lt;/p&gt;
&lt;p&gt;Once past this hurdle, I had mentioned multiple times that there seemed to be something that I was fundamentally missing on understanding what within SPIS actually terminated an SPI message. &amp;nbsp;There is so much abstraction and so much that is &amp;#39;automagically&amp;#39; done within the NRFSDK and Zephyr code bases, it is very difficult to know sometimes when you need to sit back and let the code-base do something for you and when you&amp;#39;re required to handle something for yourself. &amp;nbsp;To be clear, I&amp;#39;m not an embedded newbie. &amp;nbsp;I have used SPI in designs starting in the early 1990&amp;#39;s, so am pretty well versed in the hardware and typical software to support it. &amp;nbsp;Again, my issues here were largely around the things that were abstracted away and controlled by the software libraries and how they worked.&lt;/p&gt;
&lt;p&gt;I finally found in the Zephyr discord channel a mention that when using SPIS the driver expects to use the hardware CS line embedded in the SPI transceiver hardware and a follow-up mention of &amp;quot;don&amp;#39;t forget to set your pinctrl&amp;#39;s&amp;quot;.&lt;/p&gt;
&lt;p&gt;In the overlay, I added&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIS_CSN&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;29&lt;/span&gt;&lt;span&gt;)&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;to&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi1_default&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; psels &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIS_SCK&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;31&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIS_MOSI&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;30&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIS_CSN&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;29&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIS_MISO&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And almost immediately my code started working. &amp;nbsp;Simply the CS line was not &amp;#39;connected&amp;#39; to the code and as such the end of message was never being triggered because it&amp;nbsp;&lt;/span&gt;relies on the hardware CSN line to detect that state. &amp;nbsp;I&amp;#39;m still not sure where in the codebase this is setup/controlled. &amp;nbsp;I&amp;#39;m quite sure I would struggle to find it partially due to the lack of comments in the code.&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The frustrating thing(s) to me about all of this (semi-rant follows):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;1) I had expressed where I thought my short-coming was in my understanding (not know what or how an SPI message was terminated) and yet support never seemed to completely read through my messages and information to answer those specific questions.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;2) I feel like I went to great lengths to document as much as I could, what I perceived the issues to be and yet, the postings were never read in detail and responded to in a manner that took that information fully into account.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;3) There were multiple times that I posted follow-ups and yet the support responses continued to not respond to the most recent postings, but rather something further up the message thread (again not reading everything provided).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;4) So much of this codebase is horribly documented. &amp;nbsp;For instance, the spi_nrfx_spis.c file has zero comments (besides the copyright header) throughout 320 lines of code. &amp;nbsp;The comments sprinkled throughout other code files are equally bland--often just describing what an if statement is testing for (well, I can plainly see that) but rarely going into the &amp;#39;why&amp;#39; .&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;5) The sample code often has almost no comments within it, as well. &amp;nbsp;It seems like by taking the time to document some of this better, people would be much more likely to diagnose their own issues without bothering Nordic support. (Zero comments in the master-slave sample code or overlay)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;6) For both Nordic and Zephyr, if what you are wanting to do is largely in the mainstream, there are often samples that can be leveraged to allow you to develop fairly quickly, often without fully understanding everything that is going on under the hood. &amp;nbsp;If anything that you&amp;#39;re working on is outside of the most common use-cases, it can be super difficult to almost reverse engineer what&amp;#39;s going on to utilize the libraries properly, partially do to lack of proper documentation/examples/comments and partially due to the level of abstraction going on. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;7) The Zephyr docs can be downright horrible. &amp;nbsp;Click on a library documentation and it&amp;#39;s largely a list of function prototypes--this is not support documentation, I can read the code myself.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;8). I know many people that are much more accomplished and competent software/firmware developers than myself. &amp;nbsp;EVERYONE of them that have used the Nordic/Zephyr code bases had talked about how absolutely painful it is to learn these platforms. &amp;nbsp;Often times representing months of efforts to go up the learning curve to be somewhat proficient. &amp;nbsp;This simply shouldn&amp;#39;t be so painful.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Good luck!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/435322?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 16:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02ef522f-d3cb-456f-b2cc-8a249c3bed07</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="espian"]If you are referring to the sample master-slave code example, I had posted that it was, in fact, operating properly, and that I was returning to dealing with the initial issues that I had posted about.[/quote]
&lt;p&gt;Yes, I was referring to the sample code (master/slave) and use with the DK.&lt;/p&gt;
&lt;p&gt;I did not test with your code, or with other boards.&lt;/p&gt;
[quote user="espian"]I actually just found a major reason for it,[/quote]
&lt;p&gt;Good that you that you found the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/435072?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 17:08:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:238a60d0-9074-4b2d-9d3e-be929f3095d3</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;What issue have you not been able to replicate?&lt;/p&gt;
&lt;p&gt;If you are referring to the sample master-slave code example, I had posted that it was, in fact, operating properly, and that I was returning to dealing with the initial issues that I had posted about.&lt;/p&gt;
&lt;p&gt;Are you referring to the code and overlay that I followed up with, above? &amp;nbsp;That code has issues and definitely reacts the way I&amp;#39;ve described. &amp;nbsp;I actually just found a major reason for it, but have not had time to post the reason and the fix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/435060?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 16:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98a1c331-279f-4609-9221-e8a739479541</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Keith,&lt;/p&gt;
&lt;p&gt;Sorry for the delayed response&lt;/p&gt;
&lt;p&gt;I am note able to reproduce the issue that you are having.&lt;/p&gt;
&lt;p&gt;Are you able to compile and run the sample correctly?&lt;/p&gt;
&lt;p&gt;Can you send a complete zip folder which I could build for nrf52840dk to reproduce the error you are having?&lt;/p&gt;
&lt;p&gt;If there are any other special considerations, do let me know as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/434254?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:17:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3afe386-d6b1-447d-9991-272306fd4487</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;Naeem,&lt;/p&gt;
&lt;p&gt;Any further thoughts? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Keith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/433495?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 14:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3df1f9bd-cc0a-41df-a3bc-6647a3f8fb2e</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;I did fix a couple of items in my original code. &amp;nbsp;However, the issue remains that the call back function is never called. &amp;nbsp;I have changed the buffer size up and down to check for impact there and nothing. &amp;nbsp;It doesn&amp;#39;t seem to matter if I underflow, overflow, or perfectly match the buffer size with the spi incoming data, the cb is never called.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still not clear as to what triggers the &amp;#39;end&amp;#39; of an spi transaction in the driver and I suspect that is the fundamental issue that I&amp;#39;m having.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve included everything that I can think of below. &amp;nbsp;The GPIO registers, the code properly waits for the cs line to go active (low) and then beings the spi call back setup, pauses and then waits.&lt;/p&gt;
&lt;p&gt;Thanks for having a look.&lt;/p&gt;
&lt;p&gt;Here is my full current code:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/dt-bindings/gpio/gpio.h&amp;gt;
#include &amp;lt;zephyr/devicetree.h&amp;gt;
#include &amp;lt;zephyr/drivers/spi.h&amp;gt;
#include &amp;lt;nrfx_spis.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;

// #define NRFX_LOG_MODULE MY_CODE
// #include &amp;lt;nrfx_log.h&amp;gt;

LOG_MODULE_REGISTER(my_module);

#define SPI_DEVICE_NAME &amp;quot;my_spis&amp;quot;
#define BUFFER_SIZE 1
static uint8_t buffer[BUFFER_SIZE] = {0};
// static uint8_t ack_message[] = &amp;quot;ACK&amp;quot;;

static struct k_poll_signal spi_slave_done_sig = K_POLL_SIGNAL_INITIALIZER(spi_slave_done_sig);

static struct device *spi_dev;

static struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_OP_MODE_SLAVE | SPI_TRANSFER_MSB |
				 SPI_LINES_SINGLE,
	.frequency = 1000000,
	.slave = 0,
};

#define MY_SPIS DT_NODELABEL(my_spis)
const struct device *gpio_dev;
#define CS_GPIO_NODE DT_NODELABEL(cs_gpio)
const struct device *gpio_dev = DEVICE_DT_GET(CS_GPIO_NODE);
const uint32_t cs_pin = 29;

void spi_slave_callback(const struct device *dev, int result, void *data)
{
	// Check for errors in the result
	if (result &amp;lt; 0)
	{
		printk(&amp;quot;SPI transaction failed with error code %d\n&amp;quot;, result);
		return;
	}

	// Print the received data
	printk(&amp;quot;Received data: &amp;quot;);
	for (int i = 0; i &amp;lt; BUFFER_SIZE; i++)
	{
		printk(&amp;quot;%02x &amp;quot;, buffer[i]);
	}

	printk(&amp;quot;\n&amp;quot;);

	// Print the result of the SPI transaction
	k_poll_signal_raise(&amp;amp;spi_slave_done_sig, result);
	printk(&amp;quot;SPI transaction completed with status %d\n&amp;quot;, result);
}

static int spi_begin_transaction(struct device *spi_dev, const struct spi_buf_set *rx)
{
	int err;
	printk(&amp;quot;In spi_check_for_message. \n&amp;quot;);
	k_poll_signal_reset(&amp;amp;spi_slave_done_sig);
	__asm__ volatile(&amp;quot;nop&amp;quot;);
	err = spi_transceive_cb(spi_dev, &amp;amp;spi_cfg, NULL, rx, spi_slave_callback, &amp;amp;spi_slave_done_sig);
	__asm__ volatile(&amp;quot;nop&amp;quot;);
	printk(&amp;quot;Out of spi_transceive_cb\n RET: %d\n&amp;quot;, err);
	return (err);
}

static int spi_slave_check_for_message(void)
{
	int signaled, result;
	k_poll_signal_check(&amp;amp;spi_slave_done_sig, &amp;amp;signaled, &amp;amp;result);
	if (signaled != 0)
	{
		return 0;
	}
	else
		return -1;
}

void main(void)
{

	static int err, loop_count;

	// log_init();

	printk(&amp;quot;Entering Main\n&amp;quot;);


	if (!device_is_ready(gpio_dev))
	{
		printk(&amp;quot;Device not ready.\n&amp;quot;);
		return;
	}

	spi_dev = DEVICE_DT_GET(DT_NODELABEL(my_spis));
	if (!spi_dev)
	{
		printk(&amp;quot;Could not find %s!\n&amp;quot;, SPI_DEVICE_NAME);
		return;
	}

	printk(&amp;quot;Found %s!\n&amp;quot;, SPI_DEVICE_NAME);

	spi_cfg.cs = NULL;

	/* configure the pin as input */
	int ret = gpio_pin_configure(gpio_dev, cs_pin, GPIO_INPUT);
	if (ret != 0)
	{
		printk(&amp;quot;Didn&amp;#39;t configure pin.\n&amp;quot;);
		/* handle error */
	}

	if (!device_is_ready(spi_dev))
	{
		printk(&amp;quot;SPI device not ready \n&amp;quot;);
	}
	else
	{
		printk(&amp;quot;SPI device ready \n&amp;quot;);
	}

	LOG_ERR(&amp;quot;Test Error Message to confirm log works\n&amp;quot;);
	loop_count = 0;
	while (1)
	{
		// printk(&amp;quot;Loop %d\n&amp;quot;, loop_count++);
		const struct spi_buf rx_buf = {
			.buf = buffer,
			.len = BUFFER_SIZE,
		};
		const struct spi_buf_set rx = {
			.buffers = &amp;amp;rx_buf,
			.count = 1,
		};
		/*
				const struct spi_buf tx_buf = {
					.buf = buffer,
					.len = BUFFER_SIZE,
				};
				const struct spi_buf_set tx = {
					.buffers = &amp;amp;tx_buf,
					.count = 1,
				};
		*/

		// LOG_ERR(&amp;quot;About to Call pin_get\n&amp;quot;);
		int cs_state = gpio_pin_get(gpio_dev, cs_pin);
		// LOG_ERR(&amp;quot;Just after calling pin_get\n&amp;quot;);
		if (cs_state &amp;lt; 0)
		{
			printk(&amp;quot;error in reading cs pin state.\n&amp;quot;); /* handle error */
		}
		else if (cs_state == 0)
		{
			//cs is active so, begin transaction and setup callback and then wait for callback to be called.
			err = spi_begin_transaction(spi_dev, &amp;amp;rx);
			printk(&amp;quot;Starting Wait. \n&amp;quot;);

			k_msleep(1);
			printk(&amp;quot;Done waiting. \n&amp;quot;);
			/* CS line is active, ready to transceive data */
			printk(&amp;quot;waiting... &amp;quot;);
			do
			{
				err = spi_slave_check_for_message();
				printk(&amp;quot;.&amp;quot;);
			} while (err &amp;lt; 0);
			printk(&amp;quot;\n&amp;quot;);
			printk(&amp;quot;Received data: &amp;quot;);
			for (int i = 0; i &amp;lt; BUFFER_SIZE; i++)
			{
				printk(&amp;quot;%02x &amp;quot;, buffer[i]);
			}

			printk(&amp;quot;\n&amp;quot;);
		}

		else
		{

			__asm__ volatile(&amp;quot;nop&amp;quot;);
		}

		if (err &amp;lt; 0)
		{
			printk(&amp;quot;SPI transceive error: %d\n&amp;quot;, err);
		}
	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the current proj.conf:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y

CONFIG_SPI=y
CONFIG_SPI_ASYNC=y

CONFIG_SPI_SLAVE=y
# nothing here
#CONFIG_SPI=y
#CONFIG_GPIO=y
#CONFIG_GPIO_NRFX=y
#CONFIG_SPI_SLAVE=y
#CONFIG_SPI_ASYNC=y
CONFIG_DEBUG=y
#CONFIG_PRINTK=y
#CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_IMMEDIATE=y
#CONFIG_NRFX_SPIS1=y
#CONFIG_USERSPACE=n
CONFIG_LOG=y
#CONFIG_LOG_BACKEND_RTT=n
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_DEFAULT_LEVEL=4 
CONFIG_UART_CONSOLE=y
#CONFIG_PM=n

#CONFIG_STACK_SENTINEL=y




#CONFIG_HEAP_MEM_POOL_SIZE=50512
#CONFIG_IDLE_STACK_SIZE=2048
#CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
#CONFIG_MAIN_STACK_SIZE=8192



#CONFIG_USE_SEGGER_RTT=n
#CONFIG_RTT_CONSOLE=n
CONFIG_SERIAL=y












&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is a copy of the console output:&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/pastedimage1687961433325v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is a screen shot of the logic analyzer capture feeding the dk:&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/pastedimage1687961645466v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/433480?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 13:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e28d2a2d-62f9-4fed-936f-729a9624fd77</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;I&amp;#39;m quite sure that the sample code is running properly. &amp;nbsp;However, I&amp;#39;m not going to see the UART output.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m using a Fanstel eval kit (which is almost a carbon copy of the NRF52840DK), however the Fanstel module that is mounted on my board (BT840X) does not expose UART0 because it uses that on-module to control a PA. &amp;nbsp;This was very non-obvious and only mentioned in one line in their data sheet.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to go back up in this thread to the actual issue/question as my CB is never being called. &amp;nbsp;I&amp;#39;ll post more code related to that soon.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/433181?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2023 10:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf0b2611-9178-4941-abd5-260b1566c1dc</guid><dc:creator>Naeem Maroof</dc:creator><description>[quote user="espian"]I get a toggling LED, as expected from the code. &amp;nbsp;However, I can not see any of the printk messages.[/quote]
&lt;p&gt;I am using the same sample for 52840DK and I can see the messages on console (printing both messages on the same line).&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/pastedimage1687861621021v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="espian"] 1) changing several of the printk&amp;#39;s to printf&amp;#39;s[/quote]
&lt;p&gt;What do you mean by this?&amp;nbsp;printk() is zephyr&amp;nbsp;kernel function, and is supposed to be used with ncs/zephyr for console messages.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is also important that you connect to the correct serial port.&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/pastedimage1687862080988v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/433043?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 16:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df33788c-0daf-40b0-966f-4feafb41c69d</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;My last set of comments were with the GitHub master slave code with the only change being 1) changing several of the printk&amp;#39;s to printf&amp;#39;s and 2) the above changes to the proj.conf file. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/433016?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 14:36:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a4e0aef-c377-4e81-b56f-5d5788b83862</guid><dc:creator>Naeem Maroof</dc:creator><description>[quote user="espian"]As soon as I modify the proj.conf file so that I can see the printk output, I start having issues. [/quote]
&lt;p&gt;I am not sure why such is happening.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;can you send your minimal project, just enough to show what you are facing.&amp;nbsp;Please strip it down to minimal version just to show the functionality and error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/432726?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 14:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc0b48c-5589-4459-826a-90970c996c28</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;Ok, here are some interesting results.&lt;/p&gt;
&lt;p&gt;I started a new project and pulled in the files from the master/slave GitHub repository (including the proj.conf file). &amp;nbsp;Modify nothing, build, and flash. &amp;nbsp;I get a toggling LED, as expected from the code. &amp;nbsp;However, I can not see any of the printk messages.&lt;/p&gt;
&lt;p&gt;As soon as I modify the proj.conf file so that I can see the printk output, I start having issues. &amp;nbsp;Here is the output:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.249,93[00:00:00.250,244] &amp;lt;dbg&amp;gt; mpu: region_init: [2] 0x20012000 0x150b000a
SPI master/slave example started
--- 37 messages dropped ---
SPI SLAVE TX: 0x00, 0x00
SPI TX: 0x00, 0x00
[00:00:00.250,427] &amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20012fc8 - rx_bufs 0x20012fb8 - 1
[00:00:00.250,457] &amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20012fd0 (1), current_rx 0x20012fc0 (1), tx buf/len 0x200007e4/2, rx buf/len 0x200007e0/2
[00:00:00.250,488] &amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0
[00:00:00.250,518] &amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0
[00:00:00.250,549] &amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0
SPI RX: 0x00, 0x00
[00:00:00.250,640] &amp;lt;dbg&amp;gt; os: z_tick_sleep: thread 0x20000600 for 32768 ticks
[00:00:00.250,671] &amp;lt;dbg&amp;gt; mpu: z_arm_configure_dynamic_mpu_regions: configure thread 0x20000000&amp;#39;s domain
[00:00:00.250,701] &amp;lt;dbg&amp;gt; mpu: z_arm_configure_dynamic_mpu_regions: configure domain: 0x20001448
[00:00:00.250,701] &amp;lt;dbg&amp;gt; mpu: z_arm_configure_dynamic_mpu_regions: configure domain: 0x20001448
[00:00:00.250,732] &amp;lt;dbg&amp;gt; mpu: z_arm_configure_dynamic_mpu_regions: configure user thread 0x20000000&amp;#39;s context
[00:00:00.250,762] &amp;lt;dbg&amp;gt; mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.250,793] &amp;lt;dbg&amp;gt; mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.250,793] &amp;lt;dbg&amp;gt; mpu: region_init: [2] 0x20002000 0x150b000a
[00:00:00.249,938] &amp;lt;dbg&amp;gt; mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.250,976] &amp;lt;err&amp;gt; os: ***** MPU FAULT *****
[00:00:00.251,007] &amp;lt;err&amp;gt; os:   Data Access Violation
[00:00:00.251,007] &amp;lt;err&amp;gt; os:   MMFAR Address: 0x20002010
[00:00:00.251,037] &amp;lt;err&amp;gt; os: r0/a1:  0x200020e0  r1/a2:  0x0000001c  r2/a3:  0x00000000
[00:00:00.251,068] &amp;lt;err&amp;gt; os: r3/a4:  0x20002094 r12/ip:  0x0000000e r14/lr:  0x0000258f
[00:00:00.251,068] &amp;lt;err&amp;gt; os:  xpsr:  0x01000000
[00:00:00.251,098] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00000bda
[00:00:00.251,159] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
[00:00:00.251,190] &amp;lt;err&amp;gt; os: Current thread: 0x20000000 (logging)
[00:00:01.086,059] &amp;lt;err&amp;gt; os: Halting system&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the modified proj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y

CONFIG_SPI=y
CONFIG_SPI_ASYNC=y

CONFIG_SPI_SLAVE=y

CONFIG_DEBUG=y
CONFIG_PRINTK=y
#CONFIG_NRFX_SPIS1=y
CONFIG_USERSPACE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=y
CONFIG_LOG_DEFAULT_LEVEL=4 
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_SERIAL=y

CONFIG_HEAP_MEM_POOL_SIZE=50512
CONFIG_IDLE_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I had also tried a version to route the console to the UART, but was still not seeing output (am connected to UART0, UART0 is enabled and connected to the console per the dts file, UART1 is disabled per the overlay).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/432489?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 10:29:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1153cf6d-6881-4540-819d-2630fd7b2016</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not sure why it is happening like this, while the code looks pretty much same like the SPI Master/Slave Sample.&lt;/p&gt;
&lt;p&gt;Have you tested the sample? Can you start with that and then modify / incorporate the changes you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/432409?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 18:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac2181f7-a36c-4182-9128-4c14950cfdcc</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;More information.....&lt;br /&gt;&lt;br /&gt;I changed my code to operate similar to the master/slave SPI example that is referenced in various Nordic SPI threads:&amp;nbsp;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example"&gt;NCS spi master/slave example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In particular, adding in the kpoll method to watch for spi transaction completion. &amp;nbsp;Here are a couple of code snippets:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	k_poll_signal_reset(&amp;amp;spi_slave_done_sig);
	__asm__ volatile(&amp;quot;nop&amp;quot;);
	err = spi_transceive_cb(spi_dev, &amp;amp;spi_cfg, NULL, &amp;amp;rx, spi_slave_callback, &amp;amp;spi_slave_done_sig);
	__asm__ volatile(&amp;quot;nop&amp;quot;);
	printf(&amp;quot;Out of spi_transceive_cb\n RET: %d\n&amp;quot;, err);
	return (err);

.................

			printf(&amp;quot;waiting... &amp;quot;);
			do
			{
				err = spi_slave_check_for_message();
			    printf(&amp;quot;.&amp;quot;);
			} while (err &amp;lt; 0);
			printf(&amp;quot;\n&amp;quot;);
			
.......................

static int spi_slave_check_for_message(void)
{
	int signaled, result;
	k_poll_signal_check(&amp;amp;spi_slave_done_sig, &amp;amp;signaled, &amp;amp;result);
	if (signaled != 0)
	{
		return 0;
	}
	else
		return -1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The code/device sits and waits for the cs line to drop. &amp;nbsp;Once that happens the kpoll reset occurs and spi_transceive_cb is called as shown. &amp;nbsp;Then the code goes into the do while loop to look for completion of the SPI reception. &amp;nbsp;The completion never occurs and the device keeps printing &amp;#39;.&amp;#39; &amp;#39;s to the console. &amp;nbsp;It doesn&amp;#39;t matter if I underflow the transmission, have it match the buffer definition exactly (8 bytes) or overflow, the spi reception never &amp;#39;completes&amp;#39;. &amp;nbsp;&lt;br /&gt;&lt;br /&gt;It seems as though I&amp;#39;m missing something very fundamental here. &amp;nbsp;Thank you in advance for any insights.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/432369?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 13:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:534298b6-6c6e-4f3f-897b-e60af896f734</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;Thank you for confirming this.&lt;/p&gt;
&lt;p&gt;I have code that now manually monitors a cs line and triggers a call to spi_transceive_cb. &amp;nbsp;(see below). &amp;nbsp;The first SPI transaction calls spi_transceive_cb and it returns a zero. &amp;nbsp;The second transaction throws up some debug messages from the MPU module (see further below). &amp;nbsp;In both cases I never see output from my callback function.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll continue to debug on this, but if there is something obvious that I&amp;#39;m not doing correctly, please let me know.&lt;/p&gt;
&lt;p&gt;I have verified with a logic analyzer that the SPI transmission to the NRF are happening correctly.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_OP_MODE_SLAVE | SPI_TRANSFER_MSB |
				 SPI_LINES_SINGLE,
	.frequency = 4000000,
	.slave = 0,
};

...................

while (1)
	{
		//printf(&amp;quot;Loop %d\n&amp;quot;, loop_count++);
		const struct spi_buf rx_buf = {
			.buf = buffer,
			.len = BUFFER_SIZE,
		};
		const struct spi_buf_set rx = {
			.buffers = &amp;amp;rx_buf,
			.count = 1,
		};
		/*
				const struct spi_buf tx_buf = {
					.buf = buffer,
					.len = BUFFER_SIZE,
				};
				const struct spi_buf_set tx = {
					.buffers = &amp;amp;tx_buf,
					.count = 1,
				};
		*/
		// receive data packet
		//LOG_ERR(&amp;quot;About to Call pin_get\n&amp;quot;);
		int cs_state = gpio_pin_get(gpio_dev, cs_pin);
		//LOG_ERR(&amp;quot;Just after calling pin_get\n&amp;quot;);
		if (cs_state &amp;lt; 0)
		{
			printf(&amp;quot;error in reading cs pin state.\n&amp;quot;); /* handle error */
		}
		else if (cs_state == 0)
		{
			__asm__ volatile(&amp;quot;nop&amp;quot;);
			err = spi_transceive_cb(spi_dev, &amp;amp;spi_cfg, NULL, &amp;amp;rx, spi_slave_callback, NULL);
			__asm__ volatile(&amp;quot;nop&amp;quot;);
			printf(&amp;quot;Out of spi_transceive_cb\n RET: %d\n&amp;quot;, err);
			/* CS line is active, ready to transceive data */
		}
		else
		{
			/* CS line is not active */
			__asm__ volatile(&amp;quot;nop&amp;quot;);
		}

		if (err &amp;lt; 0)
		{
			printf(&amp;quot;SPI transceive error: %d\n&amp;quot;, err);
		}
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the callback:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void spi_slave_callback(const struct device *dev, int result, void *data)
{
	// Check for errors in the result
	if (result &amp;lt; 0)
	{
		printf(&amp;quot;SPI transaction failed with error code %d\n&amp;quot;, result);
		return;
	}

	// Check if the buffer contains data
	if (buffer == NULL || BUFFER_SIZE == 0)
	{
		printf(&amp;quot;Buffer is empty or not initialized\n&amp;quot;);
		return;
	}

	// Print the received data
	printf(&amp;quot;Received data: &amp;quot;);
	for (int i = 0; i &amp;lt; BUFFER_SIZE; i++)
	{
		printf(&amp;quot;%02x &amp;quot;, buffer[i]);
	}

	printf(&amp;quot;\n&amp;quot;);

	// Print the result of the SPI transaction
	printf(&amp;quot;SPI transaction completed with status %d\n&amp;quot;, result);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the console output:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Out of spi_transceive_cb&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;RET: 0&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[00:00:35.624,877] &amp;lt;dbg&amp;gt; mpu: mpu_configure_region: Configure MPU region at index 0x2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[00:00:35.633,087] &amp;lt;dbg&amp;gt; mpu: region_allocate_and_init: Program MPU region at index 0x2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[00:00:35.641,510] &amp;lt;dbg&amp;gt; mpu: region_init: [2] 0x200015c0 0x150b000a&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/432015?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 12:35:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be67298-dfb3-4949-8393-0337e37554c4</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Keith,&lt;/p&gt;
&lt;p&gt;Thank you for being patient.&lt;/p&gt;
&lt;p&gt;Device yaml files define the device bindings and that can be used as guidelines for writing overlays.&lt;/p&gt;
&lt;p&gt;If some properties are marked as required, then those must be define in the DT overlays for those devices.&lt;/p&gt;
&lt;p&gt;As you are using nordic spis driver, looking at the driver code suggests the same what you were referring to.&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/pastedimage1687263457224v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The spi_nrfx_transceive function, under the hood, calls transceive function which in turn calls device configure (configure(dev,spi_cfg)) function. If, in calling transceive from nrf_spis driver, spi_cfg-&amp;gt;cs is defined then it would return error. So definitely, putting NULL in the cs should resolve this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/431829?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 15:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac186b05-5b19-4160-9c28-86ad83d5b7d0</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Keith,&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;I have been assigned this ticket and I did not get a chance to look at it.&lt;/p&gt;
&lt;p&gt;I will come back to it tomorrow.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/431794?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 13:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4b2444f-40f5-477b-8866-2c59a648975b</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;As I understand this now, the SPI Slave code does not support monitoring a GPIO line assigned as a CS control line. &amp;nbsp;This is still a bit opaque from the zephyr and other documentation.&lt;/p&gt;
&lt;p&gt;Passing a NULL value into spi_cfg.cs allows the spi_transceive_cb to be called without an immediate error being thrown.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m in the process of manually checking for the state of a cs line and should have some more code ready test later today. &amp;nbsp;&lt;br /&gt;&lt;br /&gt;Does anyone know if there is a decent write-up on the SPI support software and its functionality for NRF running zephyr?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS on NRF52840</title><link>https://devzone.nordicsemi.com/thread/431598?ContentTypeID=1</link><pubDate>Sun, 18 Jun 2023 02:37:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bf10315-7692-4127-aa52-ee4f8bdaaa0f</guid><dc:creator>espian</dc:creator><description>&lt;p&gt;Ok, I have the log information now going. &amp;nbsp;The -EINVAL is from this error message: &amp;nbsp;&lt;span&gt; spi_nrfx_spis: CS control via GPIO is not supported&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am assuming at this point that something in my overlay is not quite right with regards to the CS definition. &amp;nbsp;This information should be in the previous post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks in advance for any thoughts.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Keith&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>