<?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>Need to solve excessive thread-unblock latency on nrf9160 + zephyr SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103234/need-to-solve-excessive-thread-unblock-latency-on-nrf9160-zephyr-sdk</link><description>I am using NRF9160 with the Nordic SDK 2.3.0, on the NRF9160DK. 
 I have a 10 ms HW timer interrupt, and it is meant to wake up a thread each 10 ms. The issue is that the latency between the ISR and the thread waking-up has excessive variance: randomly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Aug 2023 07:45:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103234/need-to-solve-excessive-thread-unblock-latency-on-nrf9160-zephyr-sdk" /><item><title>RE: Need to solve excessive thread-unblock latency on nrf9160 + zephyr SDK</title><link>https://devzone.nordicsemi.com/thread/443841?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2023 07:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9fc3ee6-3c2c-4c53-8326-318764d344b9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;ol&gt;
&lt;li&gt;How are you disabling the power management? The default behavior is tickless idle enabled in Zephyr which disables RTC tick in sleep triggered in idle_task. If you can see how long your idle task is running, then probably that will give you a hint of how long your system is sleeping. If you have disabled power management then check in the systemview that the idle task is running as less as possible.&lt;/li&gt;
&lt;li&gt;Which GPIO number is this? you can set a breakpoint in the GPIOTE interrupt handler&amp;nbsp;and see the registers of this peripheral to find out which GPIO pin config is causing this. There are suggestions in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fgpiote.html&amp;amp;cp=5_0_0_5_9_1&amp;amp;anchor=concept_jyp_21x_lr"&gt;documentatation &lt;/a&gt;on how to avoid spurious interrupts from GPIO or port events.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to solve excessive thread-unblock latency on nrf9160 + zephyr SDK</title><link>https://devzone.nordicsemi.com/thread/443809?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2023 00:53:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae2a2f91-f794-48fc-b74f-8cf2daa9727e</guid><dc:creator>jpnorair</dc:creator><description>&lt;p&gt;It&amp;#39;s not variance in the timer handler. &amp;nbsp;It is variance in the task that the timer handler unblocks. &amp;nbsp;We use the segger tools and couldn&amp;#39;t find any thread causing problems, but I think there are two possibilities. &amp;nbsp;Maybe you can advise.&lt;/p&gt;
&lt;p&gt;1. we think we are disabling power-management features in Zephyr, but Zephyr is not confidence-inspiring. &amp;nbsp;It could be the case that it is going into low power modes despite our best efforts.&lt;/p&gt;
&lt;p&gt;2. There is an oscillating GPIO ISR. &amp;nbsp;Again, we don&amp;#39;t think we are enabling any of these, but Zephyr is so opaque.&lt;/p&gt;
&lt;p&gt;Can System view give information about either of these?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to solve excessive thread-unblock latency on nrf9160 + zephyr SDK</title><link>https://devzone.nordicsemi.com/thread/443516?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2023 09:27:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f6404ab-8270-46ae-bdee-c5eaced9d99d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It seems like you need a tracing solution like &lt;a href="https://www.zephyrproject.org/tracing-zephyr-applications-with-segger-systemview/"&gt;Segger Systemview&lt;/a&gt;&amp;nbsp;to find out what other contexts are causing that variance in triggering your timer handler.&lt;/p&gt;
&lt;p&gt;Since all contexts are organized into time axis, you will see if this variance is caused by other high priority context masking your timer handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>