<?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>NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53139/nrf52-calculation-method-between-rising-edges</link><description>HI. 
 I&amp;#39;m developing a nRF52 custom board. 
 I use a Crypto chip, and I have to calculate and store the count value between the Rising Edges. 
 
 How should I do it? 
 Please reply.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Oct 2019 20:45:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53139/nrf52-calculation-method-between-rising-edges" /><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/217208?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2019 20:45:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ee2b109-c9ed-4dd6-a367-451f5c5d4c4c</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="84116" url="~/f/nordic-q-a/53139/nrf52-calculation-method-between-rising-edges/216732"]Is it correct to use these two functions together?[/quote]
&lt;p&gt;No, not for the same timer instance.&lt;/p&gt;
&lt;p&gt;I made some adjustment to the example, e.g. added Segger RTT logging. It will count the number of low to high pulses for the duration of 10sec(COUNT_READ_INTERVAL), print the number, then it will restart counting from 0. I tested this with SDK 15.3:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attachment&lt;/strong&gt;: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/gpiote_5F00_timer_5F00_ppi.zip"&gt;devzone.nordicsemi.com/.../gpiote_5F00_timer_5F00_ppi.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216732?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 06:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc1f6c6-cf4c-4918-9e4f-05bf218c61a2</guid><dc:creator>Glory</dc:creator><description>&lt;p&gt;&lt;span&gt;Handler does not work after timers_init.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;timer_cfg.mode = NRF_TIMER_MODE_TIMER&lt;/span&gt;&lt;br /&gt;&lt;span&gt;timer_cfg.mode = NRF_TIMER_MODE_LOW_POWER_COUNTER&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Is it correct to use these two functions together?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216714?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 00:38:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e23f2df-4491-447c-8323-6989bc8d3aad</guid><dc:creator>Glory</dc:creator><description>&lt;p&gt;Oh...!&amp;nbsp;&lt;br /&gt;&lt;span&gt;There are a lot of things I don&amp;#39;t know.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thank you for helping me. I&amp;#39;ll test the part you&amp;#39;ve mentioned after I&amp;#39;ve corrected it.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216583?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 11:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5883263e-c7d9-4b3f-a1d9-8f4afbc49fdd</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;For every&amp;nbsp;transition from low to high, the counter is incremented, and can be read in&amp;nbsp;&lt;span&gt;timer_handler_read().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You might however need to change the argument in&amp;nbsp;GPIOTE_CONFIG_IN_SENSE_LOTOHI() from false to true.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216255?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 00:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d27663d-50e8-44bb-87f0-dd4fb11fc9e1</guid><dc:creator>Glory</dc:creator><description>&lt;p&gt;&lt;span&gt;After checking the code you attached, is it correct to check the Rising edge to Rising edge count with timer_handler_read?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216081?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 08:33:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:732f12f2-80ce-43a0-8a02-172cb6228462</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, you have &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpiote.html?cp=3_2_0_20#concept_knz_kww_lr"&gt;8 GPIOTE channels&lt;/a&gt;, so that should not be an issue. Also note that&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=3_2_0_21#concept_sxf_21l_1s"&gt;PPI &lt;/a&gt;has a fork mechanism, so one event can trigger&amp;nbsp;a&amp;nbsp;&lt;span&gt;second&amp;nbsp;task.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/216028?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 00:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b29af254-4d15-4ec4-9ab2-022399843814</guid><dc:creator>Glory</dc:creator><description>&lt;p&gt;&lt;span&gt;Using GPIOTE, can I set two pins to detect the Rising edge and start and end with PPI?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Calculation Method Between Rising Edges</title><link>https://devzone.nordicsemi.com/thread/214631?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 13:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9c914b9-78bb-422a-9650-3bba877d9421</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/23267/how-to-measure-two-wave-delay"&gt;this post.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This might also be useful:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pin_5F00_rise_5F00_count_5F00_ppi_5F00_gpiote_5F00_timers.zip"&gt;devzone.nordicsemi.com/.../pin_5F00_rise_5F00_count_5F00_ppi_5F00_gpiote_5F00_timers.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>