<?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 timer as counter</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38091/using-timer-as-counter</link><description>Hi, 
 
 I am using sdk12.2 and customised nrf52 board. 
 I want to interface ultrasonic sensor with nrf52. In this I am enabling trigger pin as high and after sometime my echo pin goes low. I want to start timer when I am enabling trigger pin and stop</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Sep 2018 09:13:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38091/using-timer-as-counter" /><item><title>RE: Using timer as counter</title><link>https://devzone.nordicsemi.com/thread/147131?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 09:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f5673e7-80ea-4cdc-bc2b-371585178ef3</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;See the&amp;nbsp;&lt;a title="PPI Example" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ppi_example.html?cp=4_0_1_4_5_20"&gt;PPI Example&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;d start by playing with the TIMER and GPIOTE via HAL. Set up some GPIOTE tasks like pin toggles that are triggered by a TIMER&amp;#39;s compare tasks. Use a digital analyzer to see how the GPIOs behave.&amp;nbsp;This will teach you the basics of the PPI system (EVENT --&amp;gt; TASK) and how to set up the TIMER and GPIOTE.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The PPI system uses the register address of an EVENT and couples it to the register address of a TASK. All drivers or HALs should have a function for getting the address of an EVENT or TASK. Those addresses are also given in the&amp;nbsp;&lt;/span&gt;&lt;a title="Registers" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/timer.html?cp=2_0_0_5_29_4#topic"&gt;Registers&lt;/a&gt;&lt;span&gt;&amp;nbsp;chapter&amp;nbsp;of a peripheral&amp;#39;s technical specification.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timer as counter</title><link>https://devzone.nordicsemi.com/thread/147073?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 04:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4e1d183-d4d2-418b-b2ed-70bbc8e694d7</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you help me to build algorithm using Timer, GPIOTE and PPI?&lt;/p&gt;
&lt;p&gt;I am not aware about the use of PPI. I have used Timer as well as GPIOTE. Still not sure how that will help me to get time between high to low transition of pins.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timer as counter</title><link>https://devzone.nordicsemi.com/thread/146904?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 08:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0c81a6f-cc2d-4ec1-b3dd-400c14d42aee</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You need to use TIMER + GPIOTE via PPI.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;See&amp;nbsp;&lt;a title="Timer Example" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/nrf_dev_timer_example.html?cp=4_0_8_4_5_38"&gt;Timer Example&lt;/a&gt;, &lt;a title="Timer HAL and driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__nrf__timer.html?cp=4_0_8_6_6_24"&gt;Timer HAL and driver&lt;/a&gt;,&amp;nbsp;&lt;a title="GPIOTE abstraction and driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__nrf__gpiote.html?cp=4_0_8_6_6_4"&gt;GPIOTE abstraction and driver&lt;/a&gt;, and&amp;nbsp;&lt;a title="PPI HAL and driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__nrf__ppi.html?cp=4_0_8_6_6_15"&gt;PPI HAL and driver&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>