<?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>nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90707/nrf52833-ppi-pwm-pulse-counter</link><description>Hi Team, 
 
 We are developing an application where we have PWM like pulses coming from our sensor. Max frequency of this would be around ~8k. We want to poll the number of pulses we have received in X amount of time (let&amp;#39;s say this X amount of time is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Nov 2022 08:09:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90707/nrf52833-ppi-pwm-pulse-counter" /><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/395037?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 08:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6de3bf75-1119-43d7-8404-6a1ce9fecf13</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Thank you. It compiles now&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/394797?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 19:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05cc6144-f880-48fe-8310-ead8e01b4fab</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I took a quick look. Try replacing the places where&amp;nbsp;&lt;span&gt;NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY is used&amp;nbsp;&lt;/span&gt;with&amp;nbsp;IRQ_PRIO_LOWEST&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/394793?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 18:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4eac98-3e04-45c6-972f-c9d602deed2a</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi, I&amp;#39;ve downloaded your sample code. I&amp;#39;m using V1.9.1 of nRF Connect, unfortuantely it doesn&amp;#39;t compile.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d be gratefuil if you would be kind enough to take a look for me please.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/381000?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98bf0dca-c5fc-4458-8979-76b58329bc73</guid><dc:creator>Sigurd</dc:creator><description>[quote user="hmolesworth"]What&amp;#39;s &amp;quot;a bit&amp;quot;? One might assume that the HFCLK isn&amp;#39;t doing much on the Timer as &amp;quot;I&lt;em&gt;n counter mode, the TIMER&amp;#39;s internal Counter register is incremented by one each time the COUNT task&amp;nbsp;is triggered, meaning the timer frequency and the prescaler are not utilized in counter mode&lt;/em&gt;&amp;quot;. I don&amp;#39;t see figures for PPI, which presumably also requires HFCLK ..[/quote]
&lt;p&gt;GPIOTE -&amp;gt; PPI -&amp;gt; TIMER draws power, I would have to double check to be sure, but if I recall correctly it&amp;#39;s a 1.1uC charge when its &amp;quot;wakes&amp;quot; up to increment the counter register.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/380995?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71edda82-8bec-4d07-afc5-21ced91e0f2b</guid><dc:creator>Sigurd</dc:creator><description>[quote user="harshal034"]One follow up question: To save the power if we disable the PPI channel, it should stop counting and consuming that extra power, right? Basically, we would like to enable/disable this PPI at runtime. To make sure that we have it only when we need it.[/quote]
&lt;p&gt;Correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/380225?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 22:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d7e2bf4-1837-4a21-a3b2-8c59ed7323bc</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;What&amp;#39;s &amp;quot;a bit&amp;quot;? One might assume that the HFCLK isn&amp;#39;t doing much on the Timer as &amp;quot;I&lt;em&gt;n counter mode, the TIMER&amp;#39;s internal Counter register is incremented by one each time the COUNT task&amp;nbsp;is triggered, meaning the timer frequency and the prescaler are not utilized in counter mode&lt;/em&gt;&amp;quot;. I don&amp;#39;t see figures for PPI, which presumably also requires HFCLK ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/380223?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 21:10:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:697672db-89c0-4fe7-8259-007386d1ab7c</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Thanks Sigurd for the prompt response.&lt;/p&gt;
&lt;p&gt;We will look into the example you shared.&lt;/p&gt;
&lt;p&gt;One follow up question: To save the power if we disable the PPI channel, it should stop counting and consuming that extra power, right? Basically, we would like to enable/disable this PPI at runtime. To make sure that we have it only when we need it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 + PPI + PWM Pulse Counter</title><link>https://devzone.nordicsemi.com/thread/380220?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 21:03:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e320d92d-5383-42b7-a833-dc37f461874b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="112081" url="~/f/nordic-q-a/90707/nrf52833-ppi-pwm-pulse-counter"]Is it possible to do such counting,&amp;nbsp;without interrupt and CPU cycles?[/quote]
&lt;p&gt;Yes, I have some sample code that showcases this here:&amp;nbsp;&lt;a id="" 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;&lt;/p&gt;
[quote userid="112081" url="~/f/nordic-q-a/90707/nrf52833-ppi-pwm-pulse-counter"]Since ours is a battery operated device, does using PPI affect sleep current? Currently we have measured sleep current as 2.7uA with our custom HW.[/quote]
&lt;p&gt;Yes, when the TIMER Counter increases because of the PWM pulse the current will go a bit up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>