<?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>COUNTER starts at zero (0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59141/counter-starts-at-zero-0</link><description>Hello, 
 I am creating an application that counts the number of times the button is pressed (Every high to low transition). 
 I am using GPIOTE to sense the high-to-low events. I have used PPI to connect the GPIOTE event to trigger the COUNT and CAPTURE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Mar 2020 01:53:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59141/counter-starts-at-zero-0" /><item><title>RE: COUNTER starts at zero (0)</title><link>https://devzone.nordicsemi.com/thread/240147?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 01:53:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:759ffc57-b10c-4731-b10a-754f2dacf495</guid><dc:creator>jdelapena</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, I have tried that. That was actually my original approach. I only used PPI to trigger the COUNT task and do the capture on the BSP event handler. It works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your response. I was actually just trying to experiment with the PPI. Now it&amp;#39;s clear that tasks do not happen sequentially when using PPI. Thank you!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jade&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: COUNTER starts at zero (0)</title><link>https://devzone.nordicsemi.com/thread/240056?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 14:42:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:659d34d2-7bf0-4129-aeda-662629a663c5</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The COUNT and CAPTURE tasks do not happen sequentially when you are triggering these from the same event over PPI, this will trigger HW signals that will reach the TIMER endpoints at approximately the same time. The counter inside the TIMER will start out with a value of 0 until the COUNT task has been triggered. Since you trigger the COUNT and CAPTURE tasks at the same time, the capture will most likely happen before the counter has been incremented. Have you tried triggering the capture in the BSP event handler before reading out the CC register?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>