<?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>nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106716/nrf5340-spi-timeout-at-128mhz</link><description>I have an issue that seems to be somehow optimization and timing based. I am servicing an ISR for a spi chipset and when I change from 64MHz to 128MHz. The SPI Still works but makes for a very messy log. I am using 2.5 SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Mar 2024 10:08:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106716/nrf5340-spi-timeout-at-128mhz" /><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/472657?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 10:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fcbe4fb-7b36-49b4-a3db-f74b0f1b76d4</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your extreme patience with this.&lt;br /&gt;&lt;br /&gt;The developers of the module do not spot anything here that would cause the described behavior. We are also still unable to&amp;nbsp;reproduce&amp;nbsp;this on our end.&lt;br /&gt;Could you possibly share with us the logic analyzer trace of the tests where this does and does not happen, so that we may take a closer look?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/470454?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2024 12:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c296ca10-d975-416a-b6e8-19ef16386108</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;Here are the files and it still happens in 5.2.2&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have developed a custom st25r3911 nfc reader driver that uses the low power modes and servicing the interrupts is when this happens.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8272.autoconf.h"&gt;devzone.nordicsemi.com/.../8272.autoconf.h&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6507.zephyr.dts"&gt;devzone.nordicsemi.com/.../6507.zephyr.dts&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/468634?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2024 13:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dea0ca85-992e-4c64-86c7-6be07cb080b5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;We have unfortunately not been able to reproduce this in our tests following the setup and approach you have described.&lt;br /&gt;Our analysis has also not uncovered how this could be related.&lt;br /&gt;&lt;br /&gt;Could you provide the zephyr.dts and autoconf.h files from your build?&lt;br /&gt;If you could also provide the trace from your digital analyzer, for both the 64 MHz and 128 MHz scenarios?&lt;br /&gt;If you could details your hardware setup as well that would be very helpful.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/467744?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 12:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dd5dcd9-7192-4bc8-b87d-1f65d53f5bbe</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;br /&gt;We&amp;#39;re setting up a test to reproduce this&amp;nbsp;either tomorrow or Thursday.&lt;br /&gt;I&amp;#39;ll update you here once we have gotten to take a closer look.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/466076?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 15:33:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1dfac34-690d-4806-b536-f078c914e00a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I will discuss this with one of our engineers contributing to the Zephyr project medio next week, since he is out of office until then.&lt;br /&gt;We&amp;#39;ll try to replicate this from the description you&amp;#39;ve given and see if we can pinpoint what could be happening here.&lt;br /&gt;&lt;br /&gt;That said, my discussion with another colleague today yielded some findings:&lt;br /&gt;It is strange that change to the&amp;nbsp;CPU clock should have anything to say for the timeout checking of the SPIM driver, since this is done using the system clock which is the LFCLK.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll come back with an update when I&amp;#39;ve spoken to the other engineer next week.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/465863?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 15:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c03b5f59-1b1c-4bc6-8df4-3fd9203dc58a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your extreme patience with this!&lt;br /&gt;I understand that you would like the root cause of this to be resolved, of course.&lt;/p&gt;
&lt;p&gt;Our developers have now performed a review of the nrfx driver code, and they have verified that the correct approach is used there, which indicates that the issue either is with your application or with the Zephyr SPIM driver, and since your change of the core clock speed is correct I think we should reach out to the Zephyr developers about this.&lt;br /&gt;&lt;br /&gt;Could you raise this question directly in &lt;a href="https://www.zephyrproject.org/community/"&gt;the Zephyr support discord&lt;/a&gt;, while I check with our developers contributing to the Zephyr project if we&amp;#39;ve got any leads for where the issue might lay?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/462940?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 15:03:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b16a90b7-cab1-4386-94ff-0a35d35b2121</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I would like to see if this can be resolved as it seems to be related to the processors speed and i would like to be able to use 128MHz for some implementations.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/462895?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 13:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2134fca-3928-4903-9c5f-9c813e11d1c2</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your extreme patience with this. I am now back in office again following the national holiday season.&lt;br /&gt;&lt;br /&gt;Do you still require technical support with this issue?&lt;br /&gt;If so, I will reach out to our nrfx developers about this to see if they&amp;#39;ve got any feedback on this.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461748?ContentTypeID=1</link><pubDate>Wed, 27 Dec 2023 09:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73b6bbf5-c62c-40c0-99aa-92862a2abe3b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Hello,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;We are severely understaffed this week because of the Christmas holidays, and Karl will have to get back to you on this next week. Sorry for the inconvenience.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461624?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2023 17:59:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95bb746d-c6af-4d1a-9517-fc620fb135f9</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I also am occasionally seeing a precise bus fault&lt;pre class="ui-code" data-mode="text"&gt;[00:00:22.657,379] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****
[00:00:22.657,379] &amp;lt;err&amp;gt; os:   Precise data bus error
[00:00:22.657,409] &amp;lt;err&amp;gt; os:   BFAR Address: 0x0
[00:00:22.657,409] &amp;lt;err&amp;gt; os: r0/a1:  0x20003408  r1/a2:  0xe000ed00  r2/a3:  0x00000000
[00:00:22.657,409] &amp;lt;err&amp;gt; os: r3/a4:  0x00000000 r12/ip:  0x00000003 r14/lr:  0x000458ed
[00:00:22.657,440] &amp;lt;err&amp;gt; os:  xpsr:  0x81000000
[00:00:22.657,440] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x000458da
[00:00:22.657,470] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
[00:00:22.657,531] &amp;lt;err&amp;gt; os: Current thread: 0x20003408 (sysworkq)
[00:00:22.714,538] &amp;lt;err&amp;gt; fatal_error: Resetting system&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461434?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 12:36:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5be12aa6-2abe-4da0-9de7-f96e8bf0af50</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;Everything appears correct on the logic analyzer.&amp;nbsp; &amp;nbsp; What i see is that i get the timeout almost immediately&amp;nbsp;on the order of uS when there is supposed to be a timeout of 200mS in the device driver.&amp;nbsp; Like i Stated before the only difference is using the 128MHz clock.&amp;nbsp; I might imagine that since this is using NRFX rather then a kconfig the zephyr kernel is not being configured correctly.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);&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;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);


Device Tree

spi0_default: spi0_default {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; group1 {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 14)&amp;gt;,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 10)&amp;gt;,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;NRF_PSEL(SPIM_MISO, 1, 11)&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; };
&amp;#160; &amp;#160; };

&amp;amp;spi0 {
&amp;#160; &amp;#160; compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
&amp;#160; &amp;#160; status = &amp;quot;okay&amp;quot;;
&amp;#160; &amp;#160; cs-gpios = &amp;lt;&amp;amp;gpio1 13 GPIO_ACTIVE_LOW&amp;gt;;

&amp;#160; &amp;#160; pinctrl-0 = &amp;lt;&amp;amp;spi0_default&amp;gt;;
&amp;#160; &amp;#160; pinctrl-1 = &amp;lt;&amp;amp;spi0_sleep&amp;gt;;
&amp;#160; &amp;#160; pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
&amp;#160; &amp;#160; st25r3911:st25r3911@0 {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; compatible = &amp;quot;st,st25r3911&amp;quot;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; reg = &amp;lt;0&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; spi-max-frequency = &amp;lt;4000000&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; irq-gpios = &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_HIGH&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; led-nfca-gpios = &amp;lt;&amp;amp;gpio0 7 GPIO_ACTIVE_HIGH&amp;gt;;
&amp;#160; &amp;#160; };
};&lt;/pre&gt;
&lt;div&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: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461418?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 10:38:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92b8e5ad-0ec3-4a37-bed9-f44da3cb6f97</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Thank you for clarifying.&lt;br /&gt;Could I ask which pins you are using for this?&lt;br /&gt;&lt;br /&gt;Do you have access to a logic analyzer to scope the lines so that we may verify that everything is working as intended?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461161?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 20:03:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53121d07-ecca-445f-addb-17ec7481c5e4</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;That is not the case as this is a custom board and i have checked the pins&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/461160?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 19:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eb4aa99-8347-40e3-aeb3-eb4ad905c4cb</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for the clarification.&lt;/p&gt;
&lt;p&gt;Could be that the SPI pins you are trying to use, are used by&amp;nbsp;something else, similar to what happened in the following post?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98128/spi-timout-waiting-for-transfer-complete"&gt;SPI Timout waiting for transfer complete&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Does the issue persist if you change SPIM pins? And if so, which pins were you using when this happened?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/460913?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 18:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf89aefa-579a-4e52-ba3b-32c07f455afc</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;It is spi0 on the nrf5340 and yes it does not effect function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Spi timeout at 128MHz</title><link>https://devzone.nordicsemi.com/thread/460896?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 16:06:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:016006de-fa2d-4cac-82ad-505a6b27e5d3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Do I understand it correctly that there is no impact on function or performance, it is just that you are seeing the additional logs? I assume the logs in question is the&amp;nbsp;&lt;br /&gt;&lt;em&gt;&amp;lt;err&amp;gt; spi_nrfx_spim: Timeout waiting for transfer complete&lt;/em&gt;, &lt;br /&gt;correct?&lt;br /&gt;&lt;br /&gt;Which SPI instance are you using for this? If you are using SPIM3, which speed is your SPI configured to, and as a debugging step could you try to change the instance to see if that makes any difference?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>