<?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>w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91806/w25q16jv-interfacing-with-nrf-52833-board</link><description>I am trying to interface winbond flash with the 33 board using ncs and VS code , I am able to get the code to compile and not receiving any errors , it is working and no matter what i send i am getting FF as a response 
 I have referred to Case ID: 261312</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Nov 2022 08:36:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91806/w25q16jv-interfacing-with-nrf-52833-board" /><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/393805?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 08:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6cfbe9-1ad8-42c2-972a-9d3d25f90773</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi , I agree creating multiple cases confusion but I am stuck at this problem for almost 2 months now , If we could connect for a short period of time just to solve this would be really helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/393784?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 07:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55e9c442-6b43-45b3-9094-1405136f9c8c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I see that my colleague Kazi is helping you out in your recently created case, I suggest we you keep the discussion there, as getting information from two places at once will likely lead to confusion. Here are some quick answers to the questions you&amp;#39;ve asked here, but let&amp;#39;s close this case for now and continue it in your latest one. In the future, please don&amp;#39;t create multiple cases on one thread.&lt;/p&gt;
&lt;p&gt;1. Yes, spi_nor.c must be included in your project to be used.&lt;/p&gt;
&lt;p&gt;3. too few arguments means that you have not entered enough arguments/parameters in a given function.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/393562?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 03:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29b3e580-6b26-46e4-b185-36fecb1ab54f</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;HI simon ,&lt;/p&gt;
&lt;p&gt;I tried using the spi_nor driver but I cannot get to configure it properly ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I had started a different question thread for it but did not get any satisfactory help with it ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;problem 1 - to use the spi_nor.c I have to include it manually to my src folder of my project&amp;nbsp;&lt;/p&gt;
&lt;p&gt;problem 2- I need it to get SFDP run time configuration which I cant seem to get it write ,&lt;/p&gt;
&lt;p&gt;problem 3 - in the spi_nor.c file I am getting this error&amp;nbsp;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;DEVICE_DT_INST_DEFINE(0, &amp;amp;spi_nor_init, NULL,
		 &amp;amp;spi_nor_data_0, &amp;amp;spi_nor_config_0,
		 POST_KERNEL, CONFIG_SPI_NOR_INIT_PRIORITY,
		 &amp;amp;spi_nor_api);
		 
		 
error - too few arguments in invocation of macro &amp;quot;Z_FOR_LOOP_1&amp;quot;C/C++(54)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/388255?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 06:45:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a21e35f-adbc-4209-b5b3-a0e4d4ae8425</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Since the&amp;nbsp;w25q16jv is a NOR flash device, I would recommend using the spi_nor.c driver instead of the basic spi functions I think. Please check out the driver located in&amp;nbsp;&lt;strong&gt;NCS_FOLDER\v2.x.x\zephyr\drivers\flash\spi_nor.c&amp;nbsp;&lt;/strong&gt;and rather use &lt;strong&gt;spi_nor_access&lt;/strong&gt;() and&amp;nbsp;&lt;strong&gt;spi_nor_wait_until_ready&lt;/strong&gt;() functions to make sure the flash device is ready to receive the next message before transmitting a new message. As I think the flash might not be ready to receive a new message when you call the transceive function and it returns this error.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/388114?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 11:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6021025-40ba-43c1-b84e-2f9d75ab4ecd</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi Simon ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am getting the error in spi_transceive.&lt;/p&gt;
&lt;p&gt;working&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/3465.Working.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;not working&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/7674.notworking.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/387840?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:56:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2335891-7ea2-4262-8370-faca5485b571</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you could make the snippets include the names of the lines that would be better. What function is it that returns error -22 that points to the previous write not being finished? The general meaning of error -22 means there is an invalid argument somewhere in a function.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/387688?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 12:11:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:061be774-0231-45a8-8d76-5e06482d9700</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Sorry for the late response , I was trying to figure it out ,&amp;nbsp;&lt;em&gt;&lt;/em&gt;have now received some values from the flash but its not correct ,&lt;/p&gt;
&lt;p&gt;I want to try using CPOL=0 CPHA=1 because I tried it on another board and it was working fine , but when I try to implement it , I get -22 error which means that my previous write has not finished , but I am using only one&amp;nbsp;transceive function to send all 4 bytes . I am attaching both captures of my Logic analyzer&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/3632.Working.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt="nrf board " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/notworking.PNG" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386860?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 12:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6723bc00-7e82-4a81-bee3-b3a0a5de8fcd</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Me and a colleague looked at your code, but it&amp;#39;s very hard to spot something wrong by just looking at raw code, so we have not seen anything obviously wrong in your application. Can you upload a picture of the activity on your logic analyzer with a label of what line is what pin, right after a read JEDEC ID operation, from the Arduino and from an nRF52833. That way we can compare and find out where exactly things are going wrong.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386573?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 09:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22823326-c29b-4c1f-9389-743f8e7bf62f</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;My first step is to read JEDIC ID ,but i am not getting any response from the device only&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my code and I&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;sys/printk.h&amp;gt;
#include &amp;lt;device.h&amp;gt;
#include &amp;lt;drivers/spi.h&amp;gt;
#include &amp;lt;hal/nrf_gpio.h&amp;gt;
#include &amp;lt;kernel.h&amp;gt;
#include &amp;lt;devicetree.h&amp;gt;

#define SPI_MODE_CPOL 0

  struct spi_cs_control spim_cs_one = { 
                            .gpio_dev = NULL,
    						.gpio_pin = 20,
    						.gpio_dt_flags = GPIO_ACTIVE_LOW,
    						.delay = 0,
  };

static const struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_TRANSFER_MSB |
		     SPI_MODE_CPOL | SPI_MODE_CPHA,
	.frequency = 4000000,
	.slave = 0,
	.cs= &amp;amp;spim_cs_one
};

struct device * spi_dev;

static void spi_init(void)
{
	spim_cs_one.gpio_dev = device_get_binding(&amp;quot;GPIO_0&amp;quot;);
	spi_dev = device_get_binding(&amp;quot;SPI_3&amp;quot;);

	if (spi_dev == NULL) {
		printk(&amp;quot;Could not get %s device\n&amp;quot;, spi_dev);
		return;
	}
}

void spi_test_send(void)
{
	int err;
	static uint8_t tx_buffer[4]={
		0x9F,
		0x00,
		0x00,
		0x00
	};
	static uint8_t rx_buffer[3];

	const struct spi_buf tx_buf = {
		.buf = tx_buffer,
		.len = sizeof(tx_buffer)
	};
	const struct spi_buf_set tx = {
		.buffers = &amp;amp;tx_buf,
		.count = 1
	};

	struct spi_buf rx_buf = {
		.buf = rx_buffer,
		.len = sizeof(rx_buffer),
	};
	const struct spi_buf_set rx = {
		.buffers = &amp;amp;rx_buf,
		.count = 1
	};
	
	 err = spi_transceive(spi_dev, &amp;amp;spi_cfg, &amp;amp;tx,&amp;amp;rx);
	if (err) {
		printk(&amp;quot;SPI error: %d\n&amp;quot;, err);
	} else {
		printk(&amp;quot;TX sent: %x\n&amp;quot;, tx_buffer[0]);
		for(int i=0;i&amp;lt;3;i++){
		printk(&amp;quot;RX recv: %x\n&amp;quot;, rx_buffer[0]);
		}
	}	
}

void main(void)
{
	printk(&amp;quot;SPIM Example\n&amp;quot;);
	spi_init();

	while (1) {
		spi_test_send();
		k_sleep(K_SECONDS(2));
	}
}



-----------------------------------------------------------------------

arduino_spi: &amp;amp;spi3 {
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0  20 GPIO_ACTIVE_LOW&amp;gt;; /* D10 */
	pinctrl-0 = &amp;lt;&amp;amp;spi3_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi3_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	w25q16jv: w25q16jv@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;8000000&amp;gt;;
		label = &amp;quot;w25q16jv&amp;quot;;
	};
};&lt;/pre&gt;&amp;nbsp;have to read the ID by sending 9F followed buy dummy bytes&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not receiving anything from the device , is the flow of the code correct or not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386519?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 06:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a81cc7f5-94b2-4b7d-a1e8-4be52edc2c2c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;So your application does read the JEDEC ID? If so, then this shouldn&amp;#39;t be an issue.&amp;nbsp;In this case, my colleague Håkon showed another user how to read the JEDEC ID from a Winbond flash:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64355/is-there-any-spi-example-of-ncs-v1-3-to-refer-to/262533#262533"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/64355/is-there-any-spi-example-of-ncs-v1-3-to-refer-to/262533#262533&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386488?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 04:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe6d27bf-043e-489d-bb96-81f3629ac693</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;HI simon , I am still trying to understand what values should be put in&amp;nbsp;jedec-id = [EF 70 16];&lt;/p&gt;
&lt;p&gt;and why is it compulsory to mention this , cause we read this from the flash right?&lt;/p&gt;
&lt;p&gt;could you help me out plz.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386369?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 11:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:653e112f-13a4-4414-95cf-6facd5315846</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;First thing I see is that you&amp;#39;ve set the SPI max frequency to 50 MHz, which is restricted to 8MHz for the SPI peripheral on the nRF52833.&lt;/p&gt;
&lt;p&gt;Do you have the datasheet of the w25q flash device you&amp;#39;re using available? I don&amp;#39;t see where you get EF 70 16 as the JEDEC ID from here:&amp;nbsp;&lt;a href="https://www.winbond.com/hq/support/documentation/levelOne.jsp?__locale=en&amp;amp;DocNo=DA00-W25Q16JV.1"&gt;https://www.winbond.com/hq/support/documentation/levelOne.jsp?__locale=en&amp;amp;DocNo=DA00-W25Q16JV.1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Are you also able to see some kind of return or error code now, or see where in the code it stops to give you an idea of what&amp;#39;s wrong.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386175?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 12:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0702442d-f509-4fe0-bcd9-3ef8ab726309</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi Simon after making the necessary changes in my DT setting i still have not gotten it to work&amp;nbsp;&lt;/p&gt;
&lt;p&gt;this is my dts spi3 setting&lt;pre class="ui-code" data-mode="text"&gt;
arduino_spi: &amp;amp;spi3 {
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0  20 GPIO_ACTIVE_LOW&amp;gt;; /* D10 */
	pinctrl-0 = &amp;lt;&amp;amp;spi3_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi3_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	w25q16jv: w25q16jv@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;50000000&amp;gt;;
		label = &amp;quot;w25q16jv&amp;quot;;
		jedec-id = [EF 70 16];
		size = &amp;lt;16777216&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386110?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 08:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:201dba58-5676-4ffc-aaa2-6082e633f2e1</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi Simon , Yes I was not adding anything like this to my DT , I will try this out ,&lt;/p&gt;
&lt;p&gt;I am new to DTs and its functioning, Thank you for being patient&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/386099?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 07:38:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f82f811-3094-437e-b2df-0c189ed78402</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I still think this is an issue with your devicetree settings, please read &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/intro.html"&gt;our documentation on it&lt;/a&gt; thoroughly.&amp;nbsp;I would also recommend trying to do some debugging so we can see what is actually returning error codes.&lt;/p&gt;
&lt;p&gt;In your .dts file, when using an external flash, it should look something like this (SPI instead of QSPI though, since you&amp;#39;re using an nRF52833). But the jedec-id, sfdp-bfp, size, etc. needs to match the external flash&amp;#39;s datasheet.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;qspi {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;qspi_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;qspi_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	mx25r64: mx25r6435f@0 {
		compatible = &amp;quot;nordic,qspi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		/* MX25R64 supports only pp and pp4io */
		writeoc = &amp;quot;pp4io&amp;quot;;
		/* MX25R64 supports all readoc options */
		readoc = &amp;quot;read4io&amp;quot;;
		sck-frequency = &amp;lt;8000000&amp;gt;;
		label = &amp;quot;MX25R64&amp;quot;;
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
		];
		size = &amp;lt;67108864&amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt;10000&amp;gt;;
		t-exit-dpd = &amp;lt;35000&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385834?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 04:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5325534-0093-4512-8db6-15a54d8a5180</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi I can now get my cs pin to work and I am Unable to get any response from the flash , I tried implementing the flash with arduino and i can read the values stored in it , As per the data sheet i am trying to send 90h and then 000000h , where am i going wrong&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;sys/printk.h&amp;gt;
#include &amp;lt;device.h&amp;gt;
#include &amp;lt;drivers/spi.h&amp;gt;
#include &amp;lt;hal/nrf_gpio.h&amp;gt;
#include &amp;lt;kernel.h&amp;gt;
#define SPI_MODE_CPOL 0
#define MY_SPI DT_NODELABEL(spi3)

  struct spi_cs_control spim_cs_one = { 
                            .gpio_dev = NULL,
    						.gpio_pin = 20,
    						.gpio_dt_flags = GPIO_ACTIVE_LOW,
    						.delay = 0,
  };

static const struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_TRANSFER_MSB |
		     SPI_MODE_CPOL | SPI_MODE_CPHA,
	.frequency = 4000000,
	.slave = 0,
	.cs= &amp;amp;spim_cs_one
};

struct device * spi_dev;

static void spi_init(void)
{
	spim_cs_one.gpio_dev = device_get_binding(&amp;quot;GPIO_0&amp;quot;);
	
	const char* const spiName = &amp;quot;SPI_3&amp;quot;;
	spi_dev = device_get_binding(spiName);

	if (spi_dev == NULL) {
		printk(&amp;quot;Could not get %s device\n&amp;quot;, spiName);
		return;
	}
}

void spi_test_send(void)
{
	int err;
	static uint8_t tx_buffer[4]={
		0x90,
		0x00,
		0x00,
		0x00
	};
	static uint8_t rx_buffer[2];

	const struct spi_buf tx_buf = {
		.buf = tx_buffer,
		.len = sizeof(tx_buffer)
	};
	const struct spi_buf_set tx = {
		.buffers = &amp;amp;tx_buf,
		.count = 1
	};

	struct spi_buf rx_buf = {
		.buf = rx_buffer,
		.len = sizeof(rx_buffer),
	};
	const struct spi_buf_set rx = {
		.buffers = &amp;amp;rx_buf,
		.count = 1
	};

	err = spi_transceive(spi_dev, &amp;amp;spi_cfg, &amp;amp;tx, &amp;amp;rx);
	if (err) {
		printk(&amp;quot;SPI error: %d\n&amp;quot;, err);
	} else {
		/* Connect MISO to MOSI for loopback */
		printk(&amp;quot;TX sent: %x\n&amp;quot;, tx_buffer[0]);
		for(int i=0;i&amp;lt;2;i++){
		printk(&amp;quot;RX recv: %x\n&amp;quot;, rx_buffer[0]);
		}
	}	
}

void main(void)
{
	printk(&amp;quot;SPIM Example\n&amp;quot;);
	spi_init();

	while (1) {
		spi_test_send();
		k_sleep(K_SECONDS(2));
	}
}&lt;/pre&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/5875.spi.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385652?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 08:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c0a53ae-f829-4fcf-be5b-a437f4dd7da1</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;HI Simon I have connected a logic analyzer and I don&amp;#39;t see anything on my CS pin being activated , I have tried using CS-GPIO in the DTS and I also tied the spi_cs_control .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385633?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 06:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86cce800-b71c-41c1-8848-c9bb21e9be46</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi Simon , I am using the default pins for spi ,i.e. SPI default which is 23-22-21 .&lt;/p&gt;
&lt;p&gt;PIN 10 was&amp;nbsp; used in that example hence I have commented them&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried the spi loop back and it is working properly.&lt;/p&gt;
&lt;p&gt;Yes I haven&amp;#39;t named the device , I am a little confused in what to mention in my overlay file . could you help me with that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385631?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 06:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9998e31c-a5eb-4764-9319-0a6d8d837802</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you upload the error message you&amp;#39;re seeing on your end? It doesn&amp;#39;t seem like you have &amp;quot;named&amp;quot; the device as you should in the overlay file, with label, JEDEC-ID, size and max frequency. Please also note that pin P0.10 that you&amp;#39;re using as the MOSI pin, is by default configured as an NFC pin by default, and you will have to add the following config to your prj.conf file to use this as a normal GPIO:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_NFCT_PINS_AS_GPIOS"&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;/a&gt;. Additionally, if you&amp;#39;re working on an nRF52833 DK, there are some HW changes necessary to use P0.09 and P0.10 as GPIOs. This is described in our &lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52833_DK_User_Guide_20201203.pdf"&gt;DK user guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385520?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 12:44:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:547715c8-6cb2-4c1d-a5fa-14711b810a12</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;Hi I am using 2.0.2 and i am having the error of not finding the flash devise because i don&amp;#39;t have the compatible mentioned in it . I dont know what should be mentioned in the overlay file . please can you hlep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: w25q16jv interfacing with nRF 52833 board</title><link>https://devzone.nordicsemi.com/thread/385515?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 12:19:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d228fca6-618b-4078-a1c9-c3b85ac750d2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What version of nRF Connect SDK are you using for development. The version discussed in this ticket is pretty old right now, and in NCS v2.x.x and onwards we added a whole new way to do &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_pinctrl.html#ug-pinctrl"&gt;Pin Control&lt;/a&gt;. My guess is that you haven&amp;#39;t implemented the pin control correctly.&lt;/p&gt;
&lt;p&gt;You might also want to check out the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/drivers/spi_flash/README.html"&gt;JEDEC SPI-NOR sample&lt;/a&gt; in Zephyr that already sets up an external Flash and QSPI/SPI with an external flash. But you need to configure the overlay file to match your specific flash.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>