<?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>sdk16.0 ppi example, cpu waste with an empty timer handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71479/sdk16-0-ppi-example-cpu-waste-with-an-empty-timer-handler</link><description>hello Nordic 
 
 something is not clear to me regarding the use of timer and ppi to toggle a pin 
 1. to my understanding the whole idea of using the ppi is to avoid CPU intervention, but if i must have a handler as the &amp;#39;nrf_drv_timer_init()&amp;#39; demands</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Feb 2021 09:48:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71479/sdk16-0-ppi-example-cpu-waste-with-an-empty-timer-handler" /><item><title>RE: sdk16.0 ppi example, cpu waste with an empty timer handler</title><link>https://devzone.nordicsemi.com/thread/293713?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 09:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1d90e26-e4d2-4460-9448-51f68e377c9e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
&lt;p&gt;It is possible to use the timer driver without interrupts, but the way the driver is designed to need to provide a event handler function even if it is not used, when you call&amp;nbsp;nrf_drv_timer_init(). However during subsequent configuration you can decide if you want to use interrupts for specific events or not. So for instance if you configure an event on a compare using&amp;nbsp;nrf_drv_timer_extended_compare() the last parameter is a boolean that configures if you want a interrupt or not. If that is set to false the event can be used to trigger PPI, but there will never be an interrupt.&lt;/p&gt;
&lt;p&gt;The result of this is that you always need to provide a dummy timer event handler (which I agree is not elegant) but it is never called unless you want it to, so it does not cause any additional CPU usage.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>