<?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>Unexpected timing value behavior when using Zephyr timing functions.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110485/unexpected-timing-value-behavior-when-using-zephyr-timing-functions</link><description>I need to measure pulse widths with microsecond accuracy using a NRF7002DK. To do that I am using Zephyr Time Functions (CONFIG_TIMING_FUNCTIONS). My SDK is v2.6.0. 
 The pulses are routed to a GPIO interrupt that is configured GPIO_INT_LEVEL_ACTIVE to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Apr 2024 07:59:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110485/unexpected-timing-value-behavior-when-using-zephyr-timing-functions" /><item><title>RE: Unexpected timing value behavior when using Zephyr timing functions.</title><link>https://devzone.nordicsemi.com/thread/480352?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 07:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:561fa70e-2bc0-4e8d-beaa-3ec3e1d857dc</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you try to use GPIOTE+TIMER+(D)PPI in the application like this example&amp;nbsp;&lt;a href="https://github.com/sigurdnev/ncs-playground/blob/master/samples/pulse_detector/src/main.c"&gt;https://github.com/sigurdnev/ncs-playground/blob/master/samples/pulse_detector/src/main.c&lt;/a&gt;? It would be more accurate than what you have done now.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unexpected timing value behavior when using Zephyr timing functions.</title><link>https://devzone.nordicsemi.com/thread/480073?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 21:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df0b8a3c-13a9-4399-bdae-077dea6c5c69</guid><dc:creator>Adam K.</dc:creator><description>&lt;p&gt;I copied the callback code incorrectly as the assert and deassert time variables are declared static within the callback function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;static timing_t assert_time;&lt;br /&gt;&amp;nbsp; &amp;nbsp;static timing_t deassert_time;&lt;br /&gt;&amp;nbsp; &amp;nbsp;static uint32_t k_assert_time;&lt;br /&gt;&amp;nbsp; &amp;nbsp;static uint32_t k_deassert_time;&lt;br /&gt;&amp;nbsp; &amp;nbsp;uint64_t total_cycles;&lt;br /&gt;&amp;nbsp; &amp;nbsp;uint64_t total_cs_time_in_us;&lt;/p&gt;
&lt;p&gt;FYI - the erroneous timing values seem to happen as soon as the k_uptime is 64000 or greater.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>