<?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>Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28313/behavior-when-a-single-ppi-channel-triggers-2-timer-tasks</link><description>nRF52832 / SDK 14.2 / SD5.1.0 
 There might be two configurations to setup a PPI channel to assign some peripheral event to both timer capture &amp;amp; clear task: 
 
 
 
 nrf_drv_ppi_channel_assign(event, (uint32_t)&amp;amp;NRF_TIMERX-&amp;gt;TASKS_CAPTURE[Y]);
nrf_drv_ppi_channel_fork_assign</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jun 2020 18:50:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28313/behavior-when-a-single-ppi-channel-triggers-2-timer-tasks" /><item><title>RE: Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/thread/257206?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2020 18:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e717460-f432-4eb3-a214-6aadcafc7486</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;Need clarification on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/thread/194786?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 08:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd4cc266-2761-41db-a19a-db686b4a92b6</guid><dc:creator>joeyh</dc:creator><description>&lt;p&gt;About your answer to #2, it seems to be contradictory to the example provided here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34547/ppi-configuration-to-count-pulses"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/34547/ppi-configuration-to-count-pulses&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the example, it has code like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Capture counter timer using PPI to make sure this is not delayed by BLE interrupt
err_code = nrf_drv_ppi_channel_assign(ppi_channel_2, timer_read_compare_event_addr, timer_count_capture_task_addr);

// Clear counter timer using PPI to make sure this is not delayed by BLE interrupt
err_code = nrf_drv_ppi_channel_fork_assign(ppi_channel_2, timer_count_clear_task_addr); 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It works as intended by the code, which is to capture the counter, then clear it.&lt;/p&gt;
&lt;p&gt;I am confused.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Joseph&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/thread/111791?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2017 10:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:571f51dc-58da-4390-9e28-211c064a1aca</guid><dc:creator>XavierYin</dc:creator><description>&lt;p&gt;It nice that at least there is deterministic behavior. Thanks for this clear answer from Nordic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/thread/111790?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2017 10:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a9ac3ee-db8e-4035-a954-7f6db380c525</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The word from the HW architects is that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;No, it does not make a difference whether you assign the main event before or after the fork event.&lt;/li&gt;
&lt;li&gt;Unfortunately the TASKS_CLEAR will have priority over TASKS_CAPTURE and the value captured in the CC register will be 0.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Behavior when a single PPI channel triggers 2 timer tasks</title><link>https://devzone.nordicsemi.com/thread/111789?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2017 10:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d5e5c15-5213-4ad3-a139-0ce95505a26a</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi, I have asked for a comment from the designers, but it might take a few days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>