<?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>using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123131/using-pwm-input-to-measure-frequency</link><description>I have an NRF9160 system running and I see mention of &amp;quot; The nRF9160 PWM peripheral can capture the period and pulse width of an external PWM signal&amp;quot; but was a little confused as to how to implement it. I have used and I am using PWM as an output so that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Aug 2025 07:40:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123131/using-pwm-input-to-measure-frequency" /><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544882?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 07:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d65cd05-b24f-49b5-810b-38fb9eb834c5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You cannot set the interrupt priority of the pin handling itself but you can set the priority of interrupt handler for GPIO driver. The priority is handled with&amp;nbsp;NRFX_DEFAULT_IRQ_PRIORITY in&amp;nbsp;modules\hal\nordic\nrfx\templates\nrfx_config_nrf91.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544668?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 14:44:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70bfd936-8121-4970-ae45-48fe890d717f</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;How can I assure that the GPIO 09 pin has the highest priority and is handle in the fastest way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544647?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 13:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7017319-032b-4c74-856d-ec868c7acf26</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/myTimer.c"&gt;devzone.nordicsemi.com/.../myTimer.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I used the attached file. my interrupt handler for GPIO 09 is as follows. this is as minimum as I could get it.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_ARRAY_SIZE&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;NRFX_COUNTER_ARRAY_SIZE&lt;/span&gt;&lt;span&gt;];&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;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio09Callback&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;dev&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_callback&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;cb&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pins&lt;/span&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;br /&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_ARRAY_SIZE&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;capture_us&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&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;span&gt;the simple test program is as follows&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;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_callback&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_09_cb&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;init_us_timer&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_SECONDS&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_init_callback&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio_09_cb&lt;/span&gt;&lt;span&gt;, (&lt;/span&gt;&lt;span&gt;gpio_callback_handler_t&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;gpio09Callback&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;BIT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;GPIO_09_DEV_PIN&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_add_callback&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;gpio_09_dev&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio_09_cb&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_pin_interrupt_configure&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;gpio_09_dev&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_09_DEV_PIN&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_INT_ENABLE&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO_INT_EDGE&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO_INT_EDGE_RISING&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;printf&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Start GPIO_09 Interrupt test&lt;/span&gt;&lt;span&gt;\r\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_ARRAY_SIZE&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_ARRAY_SIZE&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;printk&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;GPIO_09 &lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt;\t&lt;/span&gt;&lt;span&gt;counts:&lt;/span&gt;&lt;span&gt;%d&lt;/span&gt;&lt;span&gt;\t&lt;/span&gt;&lt;span&gt;sec: &lt;/span&gt;&lt;span&gt;%3.5e&lt;/span&gt;&lt;span&gt;\t&lt;/span&gt;&lt;span&gt;freq: &lt;/span&gt;&lt;span&gt;%3.3e&lt;/span&gt;&lt;span&gt;\r\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt;, (&lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;]),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(&lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;]) &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_FREQ&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; ((&lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfxCountArray&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;j&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;]) &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRFX_COUNTER_FREQ&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_MSEC&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;200&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;printk&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;\r\n&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_SECONDS&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrfxCount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;k_sleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;K_SECONDS&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;NOTES: !!!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;this measures the frequency well up to about 30 kHz. I am setting the timer frequency to 16 MHz to get the most counts (accuracy). It does not work at all past that. anything past 60 kHz reads as ~65 kHz. I need to be able to measure a frequency of up to 150 kHz. this solution cannot do that. The interrupt handler looks like it takes about 20 usec so I miss counts when the period is &amp;lt; 20 usec. the interrupt handler needs to be on the order of 5 usec in order to count 150 kHz (6.67 usec).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;How can I get the timer to measue frequencies up to 150 kHz?&lt;/span&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: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544605?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 11:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:708f43ad-5e58-4dae-ba45-7e5678cc945d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks for lettings us know Timothy, if possible please post the solution here so that it could help others aswell. The code I posted compiled fine at my end, but I am not sure what your complete setup is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544387?ContentTypeID=1</link><pubDate>Sat, 02 Aug 2025 14:31:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55fa92cf-a59d-4ab8-921c-8306098c3f1c</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;I have the 1 usec timer working.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544235?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2025 14:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a71bc85-00a8-48c7-9151-d894e4643b22</guid><dc:creator>Timothy</dc:creator><description>&lt;div dir="ltr" data-setdir="false"&gt;Susheel&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;when I try to add just the first few lines it does not build. I am using SDK toolchain 3.0.2.&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;what am I missing in order to get this to build. I tried to build the lines shown below.&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;*************************************&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;
&lt;div&gt;
&lt;pre class="ydp9a027212yiv1444126985ui-code"&gt;#include &amp;lt;nrfx_timer.h&amp;gt;

#define TIMER_ID 1
static const nrfx_timer_t timer = NRFX_TIMER_INSTANCE(TIMER_ID);
&lt;/pre&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
******************** errors&amp;nbsp; *******************&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from C:/Nordic4/test_n9160/agr_ind_new_9160/src/jfet_files/jfet_init.c:1982:&lt;/div&gt;
&lt;div dir="ltr" data-setdir="false"&gt;
&lt;div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h: In function &amp;#39;jfet_init&amp;#39;:&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:472:24: error: invalid storage class for function &amp;#39;nrf_timer_prescaler_set&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 472 | NRF_STATIC_INLINE void nrf_timer_prescaler_set(NRF_TIMER_Type * p_reg, uint32_t prescaler_factor);&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:481:28: error: invalid storage class for function &amp;#39;nrf_timer_prescaler_get&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 481 | NRF_STATIC_INLINE uint32_t nrf_timer_prescaler_get(NRF_TIMER_Type const * p_reg);&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:489:24: error: invalid storage class for function &amp;#39;nrf_timer_task_trigger&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 489 | NRF_STATIC_INLINE void nrf_timer_task_trigger(NRF_TIMER_Type * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:500:28: error: invalid storage class for function &amp;#39;nrf_timer_task_address_get&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 500 | NRF_STATIC_INLINE uint32_t nrf_timer_task_address_get(NRF_TIMER_Type const * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:509:24: error: invalid storage class for function &amp;#39;nrf_timer_event_clear&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 509 | NRF_STATIC_INLINE void nrf_timer_event_clear(NRF_TIMER_Type *&amp;nbsp; p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:521:24: error: invalid storage class for function &amp;#39;nrf_timer_event_check&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 521 | NRF_STATIC_INLINE bool nrf_timer_event_check(NRF_TIMER_Type const * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:532:28: error: invalid storage class for function &amp;#39;nrf_timer_event_address_get&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 532 | NRF_STATIC_INLINE uint32_t nrf_timer_event_address_get(NRF_TIMER_Type const * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:541:24: error: invalid storage class for function &amp;#39;nrf_timer_shorts_enable&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 541 | NRF_STATIC_INLINE void nrf_timer_shorts_enable(NRF_TIMER_Type * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:550:24: error: invalid storage class for function &amp;#39;nrf_timer_shorts_disable&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 550 | NRF_STATIC_INLINE void nrf_timer_shorts_disable(NRF_TIMER_Type * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:559:24: error: invalid storage class for function &amp;#39;nrf_timer_shorts_set&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 559 | NRF_STATIC_INLINE void nrf_timer_shorts_set(NRF_TIMER_Type * p_reg,&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:569:42: error: invalid storage class for function &amp;#39;nrf_timer_short_compare_clear_get&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 569 | NRF_STATIC_INLINE nrf_timer_short_mask_t nrf_timer_short_compare_clear_get(uint8_t channel);&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/div&gt;
&lt;div&gt;C:/Nordic4/v2.9.0/modules/hal/nordic/nrfx/hal/nrf_timer.h:578:42: error: invalid storage class for function &amp;#39;nrf_timer_short_compare_stop_get&amp;#39;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; 578 | NRF_STATIC_INLINE nrf_timer_short_mask_t nrf_timer_short_compare_stop_get(uint8_t channel);&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544172?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2025 06:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d94d2a30-cc9b-47e0-a8a6-ba8731fb6dfe</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for delayed response Timothy,&amp;nbsp;&lt;/p&gt;
[quote user="tjm1"]1. is PWM capture possible for my device?[/quote]
&lt;p&gt;The PWM peripheral in itself is output so it cannot do a input capture. But you can use a TIMER-GPIOTE in event mode + PPI to make a capture like configuration,&amp;nbsp;&lt;/p&gt;
[quote user="tjm1"]2. how can I get a timer to time at 1 usec?[/quote]
&lt;p&gt;In nrf connect SDK, you cannot get RTOS timer to have a better resolution than 1ms using RTOS timer API. So you would have to use &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/master/drivers/include/nrfx_timer.h"&gt;nrfx_timer &lt;/a&gt;HAL API directly for measuring time with 1us resolution, you can do something like this in your code (use as template)&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;// top of src/jfet_init.c
#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;nrfx_timer.h&amp;gt;


#define TIMER_ID 1
static const nrfx_timer_t timer = NRFX_TIMER_INSTANCE(TIMER_ID);


void jfet_init(void)
{
    /* Configure the timer for 1 MHz (1 &amp;#181;s ticks) */
    nrfx_timer_config_t cfg = NRFX_TIMER_DEFAULT_CONFIG;
    cfg.frequency = NRF_TIMER_FREQ_1MHz;
    cfg.mode      = NRF_TIMER_MODE_TIMER;
    cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;

    /* Init &amp;amp; start */
    nrfx_timer_init(&amp;amp;timer, &amp;amp;cfg, NULL);
    nrfx_timer_enable(&amp;amp;timer);

    /* …rest of your JFET setup… */
}


uint32_t read_now_us(void)
{
    nrfx_timer_capture(&amp;amp;timer, NRF_TIMER_CC_CHANNEL0);
    return nrfx_timer_capture_get(&amp;amp;timer, NRF_TIMER_CC_CHANNEL0);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/544087?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 12:42:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a709f86-2ae7-40ea-8dd0-432052cba14a</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;Susheel&lt;/p&gt;
&lt;p&gt;can you please&amp;nbsp; try to answer these questions.&lt;/p&gt;
&lt;p&gt;1. is PWM capture possible for my device?&lt;/p&gt;
&lt;p&gt;2. how can I get a timer to time at 1 usec?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543987?ContentTypeID=1</link><pubDate>Tue, 29 Jul 2025 15:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27933aaf-e0ae-41b8-ad5e-77e7fc173c69</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;I set up the timers as described in&amp;nbsp;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/kernel/services/timing/timers.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/kernel/services/timing/timers.html&lt;/a&gt;. but I could not get an accurate timer at settings lower than 500 usec. my example code is shown below. At the timer expiry I toggle an output pin so I can see the timer frequency with a scope on the output pin. 1 msec and 500 usec seem to work fine but when I set it to 100 usec I see ~150 usec. below that 50 usec is ~ 170 usec, 10 usec is ~300 usec. below 500 usec the counts are very inaccurate. they do not represent the time between interrupts.&lt;/p&gt;
&lt;p&gt;what am I doing wrong. how do I get the timer to count at 1 usec?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;k_timer_init(&amp;amp;gpio_timer, gpio_timer_handler, NULL);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; k_timer_start(&amp;amp;gpio_timer, K_USEC(100), K_USEC(100));&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;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_handler&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;k_work&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;work&lt;/span&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;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpioCounter&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpio_pin_toggle&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;sw2ctrl_dev&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;SW2CTRL_DEV_PIN&lt;/span&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&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543983?ContentTypeID=1</link><pubDate>Tue, 29 Jul 2025 14:54:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f0b884e-5639-4d38-8391-f5ed59da2d5a</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;can you please tell me if PWM capture is possible for the nRF9160 SICA BIA..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543633?ContentTypeID=1</link><pubDate>Fri, 25 Jul 2025 14:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e3ac1b7-0988-4ec0-83d7-c1aecf01a653</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;can the nRF9160 SICA B1A use a PWM input to capture the input frequency? if so how o I do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543346?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 12:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a02657bc-5b8c-4368-8d0a-c57c35cf56e9</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;the example you mentioned looks like it uses a timer and a generic GPIO pin. the pwm_loopback example uses the PWM capture capability but I could not get it to build. There is no overlay file for the nRF9160 I am using and the program uses the zephyr test features. Is there a nRF9160 example that uses the PWM capture?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543225?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 14:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f82fdf7-f1e7-4193-bdaa-f659f8c70e11</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;There are lots of efforts to implement a sample to count the incoming clock frequency through a GPIO. One of them is &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/118219/measuring-1hz-to-1mhz-input-frequency-on-up-to-6-gpios-with-maximum-possible-high-accuracy"&gt;here&lt;/a&gt;&amp;nbsp;with the implementation details. Please check if one of those can be used as template.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543186?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 12:41:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52c9c4ab-d5c7-457a-ac0d-9cfe6bff49e6</guid><dc:creator>Timothy</dc:creator><description>&lt;p&gt;I have used a generic GPIO and timer on other examples in the past. I am not using it now for this application. I wanted to use the capture capability of the PWM. I see there is a ...\v3.02\zephyr\tests\drivers\pwm\pwm_loopback example. this looks like it uses a PWM output connected to a PWM input that does use capture capabilities. I tired to understand and build this but was unsuccessful. there is not an overlay for nRF9160 so I could not get it to compile. Is this what I need to understand to do PWM measure frequency and period. The example is not very clear is there some description of the PWM loopback example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using pwm input to measure frequency</title><link>https://devzone.nordicsemi.com/thread/543147?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 10:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1631ec2c-6051-49ac-9479-5479c51d69ae</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Which Timer are you using? RTC? if so which instance? make sure that the instance you are using is not used by anything else in your system. Preferably use RTC1 or 2 if available.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>