<?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>Counting Square Wave Pulses on nRF5340 Using Zephyr and GPIOTE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121517/counting-square-wave-pulses-on-nrf5340-using-zephyr-and-gpiote</link><description>Hello everyone, 
 I have an nRF5340 microcontroller (NORA B106 module), and I want to connect a square wave signal to one of its pins to read its frequency or count the number of rising edges per second. I understand that I need to use a timer in &amp;quot;Event</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 May 2025 09:20:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121517/counting-square-wave-pulses-on-nrf5340-using-zephyr-and-gpiote" /><item><title>RE: Counting Square Wave Pulses on nRF5340 Using Zephyr and GPIOTE</title><link>https://devzone.nordicsemi.com/thread/537497?ContentTypeID=1</link><pubDate>Fri, 30 May 2025 09:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0faa0594-49d5-45a2-afce-cf9e6528c407</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;thank you, I will test it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counting Square Wave Pulses on nRF5340 Using Zephyr and GPIOTE</title><link>https://devzone.nordicsemi.com/thread/537148?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 11:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:475dda20-aaba-4daf-bf86-8e5ca17d0a78</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure whether we have any direct links, but you could use the following as references and follow the same logic as mentioned earlier:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102898/timer-in-counter-mode-and-ppi"&gt;Timer in counter mode and PPI&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://medium.com/%40eivinds.erichsen/zephyr-encoder-driver-a07fd215252a"&gt;https://medium.com/%40eivinds.erichsen/zephyr-encoder-driver-a07fd215252a&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/samples/boards/nordic/nrfx/README.html"&gt;https://docs.zephyrproject.org/latest/samples/boards/nordic/nrfx/README.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Priyanka&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counting Square Wave Pulses on nRF5340 Using Zephyr and GPIOTE</title><link>https://devzone.nordicsemi.com/thread/535736?ContentTypeID=1</link><pubDate>Fri, 16 May 2025 09:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6b6d708-f48a-49d5-b632-188615b264e4</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi and thanks for the reply,&lt;br /&gt;I looked at the discussion but I noticed that many functions do not work because they need more parameters.&lt;br /&gt;Do you have something more updated?&lt;/p&gt;
&lt;p&gt;I use nRF Connect SDK v2.9.0&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counting Square Wave Pulses on nRF5340 Using Zephyr and GPIOTE</title><link>https://devzone.nordicsemi.com/thread/535604?ContentTypeID=1</link><pubDate>Thu, 15 May 2025 13:04:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14cfb303-610e-4499-bf9b-c970eb62b9a1</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s right. You would need to use the&amp;nbsp;GPIOTE module to generate events on rising edges, and it would be good to use the PPI to connect the generated GPIOTE events directly to the TIMER, so that with each rising edge the counter is incremented.&lt;/p&gt;
&lt;p&gt;You can refer&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/109026/gpiote-ppi-sdk-v2-5-2-issue-zephyr"&gt; this discussion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>