<?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 or RTC for 5 - 60 sec delay</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23736/timer-or-rtc-for-5---60-sec-delay</link><description>Hi All,
I am using the Nordic nRF52 nrf52832 device to read a value in from an Android device. The value will be between 5 and 60 seconds. I&amp;#39;m using the experimental_ble_app_blinky to control the BLE side of things. Is it best to use RTC or will a simple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jul 2017 14:36:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23736/timer-or-rtc-for-5---60-sec-delay" /><item><title>RE: Timer or RTC for 5 - 60 sec delay</title><link>https://devzone.nordicsemi.com/thread/93370?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 14:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03253502-b026-420c-a048-8d10a39f9cb6</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Go to root of SDK and search for &lt;code&gt;app_timer&lt;/code&gt;.. or let me do it for you: &lt;code&gt;components\libraries\timer\&lt;/code&gt;. Now how to use this library you can see in many example projects, just search for &lt;code&gt;app_timer_init&lt;/code&gt; in all *.c files (my search shows over 90 matches;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer or RTC for 5 - 60 sec delay</title><link>https://devzone.nordicsemi.com/thread/93369?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 14:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8461ebae-4156-4e2e-bdbc-d49f0127d3a2</guid><dc:creator>Fluke185</dc:creator><description>&lt;p&gt;Thanks endnode, I&amp;#39;m using s132 and can&amp;#39;t find app_timer in the examples. There is an example for rtc in peripherals, but when I port into my code I get the following compiler errors:&lt;/p&gt;
&lt;p&gt;......\main.c(199): error:  #20: identifier &amp;quot;RTC_DEFAULT_CONFIG_FREQUENCY&amp;quot; is undefined
nrf_drv_rtc_config_t config =
RF_DRV_RTC_DEFAULT_CONFIG;
......\main.c(199): error:  #20: identifier &amp;quot;RTC_DEFAULT_CONFIG_IRQ_PRIORITY&amp;quot; is undefined
nrf_drv_rtc_config_t config =
RF_DRV_RTC_DEFAULT_CONFIG;
......\main.c(199): error:  #20: identifier &amp;quot;RTC_DEFAULT_CONFIG_RELIABLE&amp;quot; is undefined
nrf_drv_rtc_config_t config =
RF_DRV_RTC_DEFAULT_CONFIG;
......\main.c(199): error:  #20: identifier &amp;quot;NRF_MAXIMUM_LATENCY_US&amp;quot; is undefined&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer or RTC for 5 - 60 sec delay</title><link>https://devzone.nordicsemi.com/thread/93371?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 13:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5211f79b-b637-4d7b-8723-67768c43519c</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;If by &amp;quot;simple delay&amp;quot; you mean &lt;code&gt;nrf_delay_us&lt;/code&gt; or &lt;code&gt;nrf_delay_ms&lt;/code&gt; then NO, you should never use these functions in multipurpose application with BLE. It is blocking code so MCU won&amp;#39;t be usable for that time (= you effectively kill it for the time of delay). Always prefer RTC based timers (e.g. &lt;code&gt;app_timer&lt;/code&gt; library is great and simple to use).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>