<?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>Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97561/hardware-timer-in-counting-mode-nrf-connect-sdk</link><description>Hi, Is there any example that demonstrates how I can use the Zephyr API to use a hardware timer/counter in counting mode? I need to count pulses on one of the nRF52840 pins, but I couldn&amp;#39;t find an example that could guide me in solving this problem.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Mar 2023 12:13:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97561/hardware-timer-in-counting-mode-nrf-connect-sdk" /><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414903?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 12:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4981c01c-86e7-4b86-98e3-5d86d255d9aa</guid><dc:creator>SerhiiR</dc:creator><description>&lt;p&gt;Okay, thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414899?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 12:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e95c973-1124-42d7-ac5f-3eb63cc5ac02</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi, it should be as easy as changing the value in &amp;quot;&lt;span&gt;pulse_count_init&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;11&lt;/span&gt;&lt;span&gt;);&amp;quot; in the main function&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Runar&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414871?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 11:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:171053dd-6593-4f74-8be2-1392ec74db97</guid><dc:creator>SerhiiR</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/runsiv"&gt;runsiv&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you, this is really an example that can help me solve my problem. &lt;br /&gt;I checked it and it works.&lt;/p&gt;
&lt;p&gt;I have one question about it, I&amp;#39;m sure I can figure it out on my own, but maybe I can get a quick answer from you.&lt;/p&gt;
&lt;p&gt;In the example, the pin on which the pulses will be coming is set by the function &lt;strong&gt;pulse_count_init(pin);&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;This pin belongs to port gpio0, is there any way to set the pin which belongs to port gpio1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414817?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 08:38:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79a2401e-b2dd-4aeb-a24c-24f226079c51</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/serhii"&gt;Serhii&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have managed to dig up this example created by one of my coworkers which should do most of what you are after. I think the only this missing in converting the count to frequency. And its running on NCS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/too1/ncs-nrfx-pulse-count-example/blob/master/src/main.c"&gt;https://github.com/too1/ncs-nrfx-pulse-count-example/blob/master/src/main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just a disclaimer:&amp;nbsp;Beware that this code/configuration is not fully tested or qualified and should be considered provided “as-is”. Please test it with your application and let me know if you find any issues&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414687?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2023 14:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56b69e65-63d6-42fa-8b38-e66a9df56088</guid><dc:creator>SerhiiR</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://devzone.nordicsemi.com/members/runsiv"&gt;runsiv&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The maximum frequency depends on what electrical components will be put in the node responsible for generating pulses, now I can not tell you a specific frequency.&lt;/p&gt;
&lt;p&gt;I will study the link above, and will also look forward to perhaps a more recent example(or information) using Zephyr and the nRF Connect SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414678?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2023 14:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:134f281f-f034-4009-93a6-d2d17d41940f</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I understand, do you know the maximum frequency?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A similar question was once posted and given this explanation&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45281/frequency-measurement"&gt;Frequency Measurement&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This was however using the nrf5 SDK, I will see I can find any better explanations however it will give you a idea of what to do.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414667?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2023 13:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c62098e-4b11-476e-99da-8c44cecf2ae4</guid><dc:creator>SerhiiR</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/runsiv"&gt;runsiv&lt;/a&gt;&amp;nbsp;Thanks for the quick response.&lt;/p&gt;
&lt;p&gt;I will look into it in more detail, but on a quick look, I did not see the use of a timer.&lt;/p&gt;
&lt;p&gt;In my application, the timer is needed to eventually get the frequency at which the pulses come to the nRF52840 pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware timer in counting mode. nRF Connect SDK.</title><link>https://devzone.nordicsemi.com/thread/414653?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2023 13:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6fa44fe-09ef-4a5c-99ef-5f0dc0f6b9c6</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the nrfx driver for the GPIOE would be a better option for you&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/gpiote/driver.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/gpiote/driver.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I would take a look at examples mentioned in this question for a place to start&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74261/nrf5340-gpioe/306131"&gt;RE: nRF5340 GPIOE&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>