<?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>Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104726/timeout-failed-to-establish-spi-connection-while-using-phytec-link-board-eth-on-nrf9160</link><description>Hello, 
 I am using nRF9160 v1.1.0 with PHYTEC link board eth as an expansion board with ethernet controller. 
 
 
 
 To test the connection of link board with nRF9160, I am running the zephyr/samples/net/zperf application. 
 
 west build -b nrf9160dk_nrf9160_ns</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Dec 2023 09:32:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104726/timeout-failed-to-establish-spi-connection-while-using-phytec-link-board-eth-on-nrf9160" /><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/460309?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2023 09:32:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8d4f1e4-a7fc-4854-a401-3f0b5226638e</guid><dc:creator>nrfuser2137</dc:creator><description>&lt;p&gt;It is working now. The problem was that the pins of RJ45 connector were touching the pin header of the devkit. Insulating the bottom of shield with a tape made it work as expected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the support.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/458348?ContentTypeID=1</link><pubDate>Thu, 30 Nov 2023 14:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e213800b-1ec1-4edc-ae4f-90c6498d07c8</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Great to hear that the shield is working better.&lt;/p&gt;
[quote user="gspannu"]However, MISO line always remain low.[/quote]
&lt;p&gt;What does the output from the console look like? &lt;/p&gt;
&lt;p&gt;What is the purpose of the Int pin? When is it expected to change?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/457648?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2023 16:05:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:069d02f8-49ce-4591-8968-71da1028af1e</guid><dc:creator>nrfuser2137</dc:creator><description>&lt;div&gt;&lt;span&gt;Thank you &lt;/span&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; your reply. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;You are correct, the shield needed &lt;/span&gt;&lt;span&gt;3.3V&lt;/span&gt;&lt;span&gt; supply. We had not set the VDD_IO to &lt;/span&gt;&lt;span&gt;3V&lt;/span&gt;&lt;span&gt; but now we did and took the output from the logic analyzer again. The output makes much more sense now, and it also matches with the ethernet driver code.&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;span&gt;In zephyr/drivers/ethernet/eth_enc424j600.c, the following code checks for the SPI connection.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Check SPI connection */
    do {
        k_busy_wait(USEC_PER_MSEC * 1U);
        enc424j600_write_sfru(dev, ENC424J600_SFRX_EUDASTL, 0x4AFE);
        enc424j600_read_sfru(dev, ENC424J600_SFRX_EUDASTL, &amp;amp;tmp);
        retries--;
    } while (tmp != 0x4AFE &amp;amp;&amp;amp; retries);

    if (tmp != 0x4AFE) {
        LOG_ERR(&amp;quot;Timeout, failed to establish SPI connection&amp;quot;);
        return -EIO;
    }&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;In the logic analyzer output we can see the MOSI line with &lt;/span&gt;&lt;span&gt;0x4AFE.&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&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/5826.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Then we try to read the register with the same written value. The below screenshots correspond to the reading part.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&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/8168.png" /&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/6014.png" /&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;However, MISO line always remain low.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Additionally, the interrupt line is always high. We tried changing the shield .overlay link_board_eth.overlay to use gpio pin &lt;/span&gt;&lt;span&gt;05&lt;/span&gt;&lt;span&gt; as an interrupt. &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;pre class="ui-code" data-mode="text"&gt;&amp;amp;arduino_spi {
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;arduino_header 16 GPIO_ACTIVE_LOW&amp;gt;;	/* D10 */

	enc424j600_link_board_eth: enc424j600@0 {
		compatible = &amp;quot;microchip,enc424j600&amp;quot;;
		// spi-max-frequency = &amp;lt;14000000&amp;gt;;
		spi-max-frequency = &amp;lt;80000000&amp;gt;;
		// int-gpios = &amp;lt;&amp;amp;arduino_header 15 GPIO_ACTIVE_LOW&amp;gt;;	/* D9 */
		int-gpios = &amp;lt;&amp;amp;gpio0 05 GPIO_ACTIVE_LOW&amp;gt;;
		status = &amp;quot;okay&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
	};
};&lt;/pre&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;But there was no change in the output. It seems like there are still some&lt;/span&gt;&lt;/span&gt;&amp;nbsp;configuration issues.&amp;nbsp;Any further hints would be very much appreciated. Thank you for the support.&amp;nbsp;&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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/455955?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 12:09:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df27996c-452d-4a15-9686-ef33b3ca34d7</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;What is the voltage level of the IOs? Does the shield support 1.8V communication? In case 3V communication is required, you need to set the &amp;#39;VDD_IO&amp;#39; switch to &amp;#39;3V&amp;#39;. The switch is located in the corner of the board, next to the power button. There is also another option to set the voltage slightly higher using VIO_REF, if needed.&lt;/p&gt;
&lt;p&gt;How do is the shield supplied? &lt;/p&gt;
[quote user="gspannu"]&lt;div&gt;&lt;div&gt;&lt;span&gt;We observed the pins by connecting to a logic analyzer. The setup was as follows: &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 0 - cs - P0.10&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 1 - miso - P0.12&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 2 - mosi - P0.11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 3 - sck - P0.13&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 4 - int - P0.09&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;cursor:zoom-in;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8130.image.png" /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;and the output is as shown. Channel 4 in the screenshot is connected to P0.09 which shows no activity. Also, the clock signal on channel 3 looks strange. &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;The communication looks very odd. Is the sampling rate at &amp;gt;2x the SPI clock?&lt;/p&gt;
&lt;p&gt;Does your logic analyzer have analog channels? What do the signal look like?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/455804?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 15:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cecd0f1-44e2-47a1-8813-ce5d1d94adcc</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Were you able to blink any of the other pins?&lt;/p&gt;
&lt;p&gt;Have you tried routing INT to another pin, and then wire that pin to the shield? If you configure INT to another pin, try probing that pin to see whether there is any activity.&lt;/p&gt;
[quote user="gspannu"]Also, the clock signal on channel 3 looks strange. [/quote]
&lt;p&gt;Yes, I agree. I will look closer into this. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/455375?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 15:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fc913f6-8913-42b6-b22f-26e73bdd8a4f</guid><dc:creator>nrfuser2137</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;led0 {
	gpios = &amp;lt;&amp;amp;gpio0 9 0&amp;gt;;
};
&lt;/pre&gt;&lt;br /&gt;I added the above overlay in the blinky, and the led stopped blinking for me. I checked it with switch2_pin_routing enabled and disabled, also irrelevant of the switch2 position.&amp;nbsp;&lt;br /&gt;Is there something that I am missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/454242?ContentTypeID=1</link><pubDate>Mon, 06 Nov 2023 14:20:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eba5366-9d99-4014-9a1a-a25c77a19a50</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Today I experimented with disabling &lt;code&gt;&lt;span&gt;switch2_pin_routing&lt;/span&gt;&lt;/code&gt;. First, I modified &lt;em&gt;blinky&lt;/em&gt; to blink an LED from P0.09 and flashed it to nRF9160. An LED from P0.09 was then flashing. Next, I experimented with enabling and disabling &lt;code&gt;&lt;span&gt;switch2_pin_routing&lt;/span&gt;&lt;/code&gt; on nRF52. Regardless of whether it was enabled or disabled, the LED on P0.09 kept blinking. However, the LED would only blink if &lt;em&gt;Switch 2&lt;/em&gt; was set to the position closest to the LTE antenna. I tested this using nRF9160 DK v1.0.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/453792?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 14:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14461063-5da8-4949-85a7-3aa8b661cc65</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Sorry for the delay.&lt;/p&gt;
[quote user="gspannu"]We verified the nrf52 board configuration by flashing hello_world on nRF52840[/quote]
&lt;p&gt;How did you verify this? If you probe the leads of Switch 2, do you see any activity?&lt;/p&gt;
&lt;p&gt;How are the pins specified? Could you share the .overlay file for your project?&lt;/p&gt;
&lt;p&gt;Could you please also share the prj.conf file of your project?&lt;/p&gt;
&lt;p&gt;Which nRF Connect SDK version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/452501?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 10:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a628a7e7-57bd-49d8-bf20-a556f941384d</guid><dc:creator>nrfuser2137</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;We observed the pins by connecting to a logic analyzer. The setup was as follows: &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 0 - cs - P0.10&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 1 - miso - P0.12&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 2 - mosi - P0.11&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 3 - sck - P0.13&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ch 4 - int - P0.09&lt;/span&gt;&lt;/div&gt;
&lt;/div&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/7612.image.png" /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;and the output is as shown. Channel 4 in the screenshot is connected to P0.09 which shows no activity. Also, the clock signal on channel 3 looks strange. &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;We verified the nrf52 board configuration by flashing hello_world on nRF52840 which includes disabling of switch2_pin_routing in device tree.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout, failed to establish SPI connection while using Phytec link board eth on nRF9160</title><link>https://devzone.nordicsemi.com/thread/450607?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2023 13:52:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:698d4046-8091-4101-b4ab-228b2802946a</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you probed P0.09 with an oscilloscope to see that there is any activity?&lt;/p&gt;
[quote user=""]I have also&amp;nbsp;tried disabling the switch2_pin_routing in zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts and flashing zephyr/samples/hello_world on the nRF52.[/quote]
&lt;p&gt;How did you do so? You could try testing a simple sample on nRF9160 to verify that you have set up nRF52840 correctly.&lt;/p&gt;
&lt;p&gt;Best 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>