<?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 RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60502/using-rtc2-ppi-and-gpiote-to-drive-led</link><description>SDK Version: 15.1 IDE: Keil Softdevice: S132 v6 Example: Blinky peripheral example slightly modified Q1. Does the Softdevice use RTC0? Q2. Does the App Timer use RTC1? If yes, I am assuming for BLE connection events and other BLE stuff. Is this correct</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Apr 2020 09:00:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60502/using-rtc2-ppi-and-gpiote-to-drive-led" /><item><title>RE: Using RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/thread/246183?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 09:00:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d27393ec-4319-463e-ba93-d2f1bdea5d6e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Q2. Yes, if you want to use the libraries from the SDK, the best option is to use app_timer. Connection parameter negotiation could also be handled in your application and then you could have used another timing mechanism to do this. You should check through your project for calls to app_timer APIs, it is used in some other libraries for various tasks (CPU usage monitor in power management library, timeouts in serial libraries and CLI modules, LED-blinking libraries, low-power PWM library, etc.) Most likely most of these are not used in your project, which is why you should check for API calls to know which libraries are included.&lt;/p&gt;
&lt;p&gt;I would expect the app_timer to have a marginally higher average run current due to the CPU having to wake up to handle events and timeouts. I&amp;#39;m not sure what kind of difference in consumption you saw with your testing, I have not done any power profiling on this myself. As longs as you have the RTC2 approach working, and you plan on eliminating the app_timer usage from your application, I do not see any problems with that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/thread/246140?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 03:18:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bb039db-514f-402c-81c7-2b379eef458b</guid><dc:creator>BattleDroid</dc:creator><description>&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;Thanks for your continuing support.&lt;/p&gt;
&lt;p&gt;Q1.&amp;nbsp; Thanks for clarifying and providing a link to the documentation.&lt;br /&gt;&lt;br /&gt;Q2.&amp;nbsp; Although RTC1 is&amp;nbsp;not used by the softdevice directly, negotiating connection parameters for BLE seems like an essential task that either through code of my own or the SDK libraries, seems necessary.&amp;nbsp; I&amp;#39;m assuming there is some timer functionality here needed here to support BLE and the best choice is the App Timer.&amp;nbsp; If I am not understanding this correctly, please clarify.&amp;nbsp; What additional functionality other than app_button/BSP and Connection Parameters negotiation would I need to disable in order to use RTC1 for my own needs?&lt;br /&gt;&lt;br /&gt;Regarding the RTC2 usage for PWM, you were absolutely correct, PPI channel 17 was used so that is why that part of my code was not working. After changing it to use PPI channels 16 and 15, everything worked like a charm.&lt;br /&gt;&lt;br /&gt;The App Timer seems to consume more current than using the RTC2 directly.&amp;nbsp; Not sure why, since the App Timer is an RTC instance but that is what my current measurements are showing.&amp;nbsp; Can you elaborate on this?&amp;nbsp; Do you expect this?&lt;br /&gt;&lt;br /&gt;Also, regarding low-power PWM library suggestion, it also uses the App Timer, and since I still measure higher current consumption when compared to using RTC2 directly, I am going with the RTC2 route until I understand why this is the case&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;E&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/thread/246091?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 14:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668495b5-00f0-44a0-b608-01653c208648</guid><dc:creator>BattleDroid</dc:creator><description>&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;As I mentioned, using TIMER 1 requests the HFCLK which consumes ~ 500uA.&amp;nbsp; The first line of main in the example you suggested is:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;APP_PWM_INSTANCE(PWM1,1);  // Create the instance &amp;quot;PWM1&amp;quot; using TIMER1.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Therefore this is not a viable option.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;&lt;br /&gt;E&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/thread/246074?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 13:50:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c783afc-abaf-40d4-88c7-3c798f21aa7f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Q1: Yes, the softdevice use RTC0, see &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;SoC hardware peripheral requirements&lt;/a&gt; in the softdevice specifications.&lt;/p&gt;
&lt;p&gt;Q2: Yes, the app_timer library uses RTC1 by default. The use of app_timer is not required by the softdevice, but it is used by some SDK libraries (for instance the BLE&amp;nbsp;&lt;a title="Connection Parameters Negotiation" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_ble_conn_params.html?cp=7_1_3_2_4"&gt;Connection Parameters Negotiation&lt;/a&gt;&amp;nbsp;library, and in the app_button/BSP library to detect long button pushes) and for software timers in the example applications.&lt;/p&gt;
&lt;p&gt;PPI channel 17 is reserved by the softdevice (you can see which channels are reserved in nrf_soc.h header file - for s132 v6.1.0, 17-31 is reserved). Maybe that could be the reason for the issue you are seeing?&lt;/p&gt;
&lt;p&gt;The app_timer library should not have a very much higher current than using RTC directly, but this depends on your power requirements. If you are interested, there is a &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_low_power_pwm.html"&gt;low-power PWM library&lt;/a&gt; in the SDK that uses app_timer.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTC2, PPI and GPIOTE to drive LED</title><link>https://devzone.nordicsemi.com/thread/245927?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 00:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd2d1235-7f92-4e2a-8ca6-5d07c26791f3</guid><dc:creator>Jimmy Wong</dc:creator><description>&lt;p&gt;You can use the app_pwm driver (because it is on top of useing GPIO, timer and PPI together).&lt;/p&gt;
&lt;p&gt;the example is placed at&amp;nbsp;\examples\peripheral\pwm_library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>