<?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 any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64355/is-there-any-spi-example-of-ncs-v1-3-to-refer-to</link><description>I tried to drive the flash device W25Q32 on ncs v1.3, but there was no proper spi routine to refer to.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Feb 2021 12:00:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64355/is-there-any-spi-example-of-ncs-v1-3-to-refer-to" /><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/292890?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 12:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15f548cb-0650-4283-9327-87ca098100dc</guid><dc:creator>verulia</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;I am also using w25q32 spi nor flash but I am always seeing flash is not detecting on monitor. I used the same example as provided here which is spi flash in zephery library and add the files that Hakon sent, I am able to see spi output on logic analyzer and also cs is going high to low so no problem in cs pin also. Did you add anything or change anything in the code or in the proj conf files later which made your flash work or was it just problem with board? I need to detect this flash very urgently so any help would be so helpful.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/271908?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 01:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8699dc1-94a6-404d-9a27-9d4d40b8ffc7</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon Alseth,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a board welding problem.&lt;br /&gt;Thank you so much.&lt;/p&gt;
&lt;p&gt;Kind regards. Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/271013?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 09:00:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f54fcfa4-eb82-4f20-9b4a-77a65a5d5502</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please test this on another board, to rule out any issues with this specific board?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;you can also modify the samples/basic/blinky/ to only toggle P0.13, to see if this blinks or not.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/270966?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 04:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:184b0ffd-4598-4985-959c-4939e3525375</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;&lt;br /&gt;Hi H&amp;aring;kon Alseth,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using an empty board test,&lt;br /&gt;No hardware affects the use of the corresponding IO port.&lt;br /&gt;I also didn&amp;#39;t find where P0.13 was occupied by the software.&lt;br /&gt;P0.13 Why not be used as a CS foot.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2541.1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/270742?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 07:40:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0edd1ff-fc5a-4ebf-8c82-a44d56a6eb14</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some GPIOs are used for other purposes. Please see this list for the GPIOs that are already in use:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html?cp=2_0_5_4_6_0"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html?cp=2_0_5_4_6_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/270730?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 07:01:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:897f0e2f-091c-4398-8cb3-86cbfd137198</guid><dc:creator>peter.min</dc:creator><description>&lt;h3 class="name"&gt;Hi H&amp;aring;kon Alseth，&lt;/h3&gt;
&lt;p&gt;I tested the routine you provided, which can be used,&lt;br /&gt;But I made the following changes and couldn&amp;#39;t use them.&lt;br /&gt;The modifications are shown in the figure below:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1512.13.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5635.14.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By making cs, these pins can detect the flash chip of the spi interface.&lt;/p&gt;
&lt;p&gt;P0.00 01 13 14 15 26 27 08 09&lt;/p&gt;
&lt;p&gt;When these pins are cs, the flash chip of the spi interface cannot be detected.&lt;/p&gt;
&lt;p&gt;P0.19 18 17 02 03 04 05 06 07 20 21 22&amp;nbsp; 23 24 25 19 18 17 30 31&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Kind regards, Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262897?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 07:06:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56d6fab5-5c27-4e78-b459-defd51f1f6c1</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="peter.min"]Did you test with the development board PIN 10 11 12 13?[/quote]
&lt;p&gt;Yes I did.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="peter.min"]This has little to do with the logic analyzer, just look at the log log and know that the w25q32 chip is not recognized.[/quote]
&lt;p&gt;&amp;nbsp;Yes, I understand that the log states that it cannot find the IC, but your logic analyzer trace is not correct; which is the first indication for us to see what happens on the actual SPI lines. Does the IC respond to the initial transaction, does it fail further in the init() structure?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262884?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 03:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:727bb1cf-47a5-4b21-80a5-ba0571a8eaa7</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;Hi,&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/hkn"&gt;H&amp;aring;kon Alseth&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This has little to do with the logic analyzer, just look at the log log and know that the w25q32 chip is not recognized.&lt;/p&gt;
&lt;p&gt;Did you test with the development board PIN 10 11 12 13?&lt;/p&gt;
&lt;p&gt;Kind regards, Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262755?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 10:23:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79fecc7b-0bd4-4ac0-a2e4-13770ce1bd31</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;Are you sure you have connected the grounding properly to the logic analyzer?&lt;/p&gt;
&lt;p&gt;This is the scope I get when trying your code:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2664cc1c3b0c43a4946db81e63d6cde7/pastedimage1596450211292v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262638?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 09:04:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6cba006-3d68-48c8-9886-36c3ad53989c</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;Hi &lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/hkn"&gt;H&amp;aring;kon Alseth&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I test the example used ncs v1.3 on PCA10090 0.9.0&lt;br /&gt;The example path is D:\ncs\v1.3.0\zephyr\samples\drivers\spi_flash\src\main.c&lt;br /&gt;The overlay path is D:\ncs\v1.3.0\zephyr\samples\drivers\spi_flash\nrf9160dk_nrf9160ns.overlay&lt;br /&gt;The conf path is D:\ncs\v1.3.0\zephyr\samples\drivers\spi_flash\boards\nrf9160dk_nrf9160ns.conf&lt;br /&gt;The dts path is D:\ncs\v1.3.0\zephyr\boards\arm\nrf9160dk_nrf9160\nrf9160dk_nrf9160_common.dts&lt;br /&gt;The log is as below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/spi_5F00_log_5F00_w25q32.png" /&gt;&lt;/p&gt;
&lt;p&gt;The cs-gpios = &amp;lt;&amp;amp;gpio0 13 0&amp;gt;; timing diagram is seems error.&lt;br /&gt;The timing diagram is as below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/w25q32_5F00_1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/w25q32_5F00_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;The test example is attached.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf9160_4B6DD58B_demo.rar"&gt;devzone.nordicsemi.com/.../nrf9160_4B6DD58B_demo.rar&lt;/a&gt;&lt;br /&gt;Kind regards, Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262533?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 09:18:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:592c1618-dbd7-4824-9605-ac724cde2523</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not able to fully test this driver, but I created a configuration + dts overlay for W25Q32:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2664cc1c3b0c43a4946db81e63d6cde7/w25qxx_5F00_config_5F00_and_5F00_overlay.zip"&gt;devzone.nordicsemi.com/.../w25qxx_5F00_config_5F00_and_5F00_overlay.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the .conf file goes into the ../spi_flash/boards/ folder, and the .overlay goes in ../spi_flash folder.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It tried atleast to read the JEDEC ID when I scoped the MOSI + CLK line:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2664cc1c3b0c43a4946db81e63d6cde7/pastedimage1596187060405v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this configuration + overlay and see if it works/compiles at your end? Feel free to change the settings in the overlay file to match your GPIO settings and spi frequency etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262516?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:09:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b18b9a-a825-46ba-a996-4508dd940f65</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;HI H&amp;aring;konAlseth,&lt;br /&gt;I tried to open this project, but report an error.&lt;br /&gt;The relevant screenshots are as follows:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/_5362005FE55D0B7A_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/_167FD18B0D4E1A90C78F_.png" /&gt;&lt;br /&gt;Kind regards, Peter.Min&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any spi example of ncs v1.3 to refer to?</title><link>https://devzone.nordicsemi.com/thread/262405?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 12:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2e9e440-af04-4626-bdf8-f61111d9482a</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;It looks like there&amp;#39;s an example for W25Qxx in zephyr, which you can try:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/drivers/spi_flash/src/main.c"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/drivers/spi_flash/src/main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However;&amp;nbsp;it does not have a board file for nrf9160, and I personally haven&amp;#39;t tested the above sample.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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>