<?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>Timer event capture clarification</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59964/timer-event-capture-clarification</link><description>I want to use a timer to generate an event at a rate of 16kHz. So just as a test I&amp;#39;m setting up TIMER4 and a CC event to toggle a gpio pin. As I understand the clock source should be 16MHz so I&amp;#39;m loading the CC register with 1000 to generate an interrupt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Apr 2020 10:47:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59964/timer-event-capture-clarification" /><item><title>RE: Timer event capture clarification</title><link>https://devzone.nordicsemi.com/thread/244170?ContentTypeID=1</link><pubDate>Thu, 09 Apr 2020 10:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3907fea4-e3e1-4ae3-9163-d734416c7fac</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;This works, thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(@&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;&amp;nbsp;thanks, but the GPIO is only for a test, to check the sample rate is as expected)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer event capture clarification</title><link>https://devzone.nordicsemi.com/thread/244052?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 11:05:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e098c2-3303-4b8d-982c-39e71d220e8d</guid><dc:creator>haakonsh</dc:creator><description>[quote user="DmitryZ"]Also you can toggle a pin with GPIOTE module, without waking up CPU at all.[/quote]
&lt;p&gt;&amp;nbsp;The&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=4_2_0_21#concept_sxf_21l_1s"&gt;PPI — Programmable peripheral interconnect&lt;/a&gt;&amp;nbsp;can connect any event from any peripheral to any task of any peripheral. In your case, you&amp;#39;ll want to connect the CC[0] event to a GPIOTE channel&amp;#39;s OUT task.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Read the PPI and GPIOTE chapters in the Product specification, and study the examples/peripheral/ppi example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer event capture clarification</title><link>https://devzone.nordicsemi.com/thread/243954?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 18:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e875cc1-87ba-4c8f-9a06-d5e7dca9b275</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;your interrupt handler takes some time, that&amp;#39;s why frequency is lower. Instead of restarting timer in interrupt handler, add a shortcut for clearing it by COMPARE[0] event (timer is not stopped on CLEAR task):&lt;/p&gt;
&lt;p&gt;&amp;nbsp; NRF_TIMER4-&amp;gt;SHORTS =&amp;nbsp;TIMER_SHORTS_COMPARE0_CLEAR_Msk;&lt;/p&gt;
&lt;p&gt;Also you can toggle a pin with GPIOTE module, without waking up CPU at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>