<?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 Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109654/spis-interrupt-latency-delay-due-to-zephyr-tasks</link><description>Hardware: nRF5340DK 
 Software: SDK version v2.5.1 
 
 Description: 
 We are using the nrfx_spis driver and are debugging interrupt latency as we have tight timings to reload the SPIS DMA buffers. (&amp;lt;12.5us) 
 We are using CONFIG_ZERO_LATENCY_IRQS in an</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Apr 2024 11:51:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109654/spis-interrupt-latency-delay-due-to-zephyr-tasks" /><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/478966?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 11:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85ed725e-70b6-4147-b72f-b7a7170e8374</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;As far as I can tell, disabling idle is not really a use-case so we have no direct support for just turning it off.&lt;/p&gt;
&lt;p&gt;When you call k_sleep(), the app will check scheduling and if there is nothing to do, I think it will go to idle.&lt;br /&gt;Maybe try to do a while(1){} loop to never enter idle mode?&lt;/p&gt;
&lt;p&gt;Alternatively, maybe you can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK"&gt;a hook&lt;/a&gt; to check if the CPU is about to enter Idle, and then trigger a task?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/478840?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 22:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4475f0dc-a011-4d9d-8c8d-5b5f8162d4f7</guid><dc:creator>Chris R</dc:creator><description>&lt;p&gt;Well, I&amp;nbsp;guess because it&amp;#39;s an interrupt driven event I can&amp;#39;t really determine exactly when it will happen in order to pre-emptively wake up to shorten the delay. &lt;br /&gt;If you had a way to permanently disable Idle I could at least figure out the tradeoff / increase in power.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/478663?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 07:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9334d885-6590-49d6-9525-ce85d9430f3d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;First of all, removing idle will increase power consumption, so be aware of that.&lt;/p&gt;
[quote user="Chris R"] How would I go about keeping the MCU out of the IDLE state? Is there a way to force Zephyr to not go into this IDLE state?[/quote]
&lt;p&gt;Do you mean permanently, or disable idle temporarily then enable it again when you are done with the tight timings?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/478650?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 01:54:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd4cfd51-e4a0-4fe5-ba3e-46c1c8472ff1</guid><dc:creator>Chris R</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thanks!&amp;nbsp;&lt;br /&gt;That actually makes sense...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One follow up question - How would I go about keeping the MCU out of the IDLE state? Is there a way to force Zephyr to not go into this IDLE state? Does idle here mean the IDLE zephyr OS task?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/477290?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 11:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ac203c-156e-4675-8715-012c626cf806</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I asked a collegua about this and they say the following:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/reset/doc/reset.html?cp=4_0_0_3_9_11#unique_287630547"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/reset/doc/reset.html?cp=4_0_0_3_9_11#unique_287630547&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;tIDLE2CPU&lt;br /&gt;tIDLE2CPU,CONSTLAT&lt;br /&gt; &lt;br /&gt;3 us means that the system isn&amp;#39;t fully gone to systemonidle, while &amp;gt;10 us means that the clock tree is running.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Does this make sense to you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/476629?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 13:52:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdd6abc4-db8d-424f-be25-68401a6980a8</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;We have been away on Easter vacation, but we are back now.&lt;br /&gt;I will continue looking into this now&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/475967?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 14:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11764a60-2b96-49df-9578-b2ef19b0f46d</guid><dc:creator>elarson</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working with Chris on this issue. The 12.5us shown here is the most common value, with very few that have no delay. We have also seen that running with and without the debugger can affect the delay we observe, having the debugger attached somehow reduces the delay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS Interrupt Latency. Delay due to Zephyr Tasks</title><link>https://devzone.nordicsemi.com/thread/475882?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 11:58:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14c42491-ef46-4394-af1f-b07d55776e64</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]However, we are encountering a ~12.5us increase in latency when a background task is running.&amp;nbsp;[/quote]
&lt;p&gt;Is the latency the same every time, or does it vary a bit?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>