<?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>Use of timer in beacon example.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35805/use-of-timer-in-beacon-example</link><description>I am using SDK15 , nRF52832 custom board , keil uVISION 5 , ble_app_beacon example. 
 I am adding timer to the example. 
 In below code, when I comment out update_vbatt() &amp;amp; advertising_init() LED toggles perfectly means timer is working. but with those</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Jun 2018 12:05:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35805/use-of-timer-in-beacon-example" /><item><title>RE: Use of timer in beacon example.</title><link>https://devzone.nordicsemi.com/thread/138272?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 12:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:478d9d1b-6caf-4acd-8dd9-718777fc3d84</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1) You can know what peripherals softdevice is reserving &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fsd_resource_reqs%2Fhw_block_interrupt_vector.html&amp;amp;cp=2_3_1_0_6_0"&gt;here&lt;/a&gt;. You can see that softdevice is using Timer0 and&amp;nbsp; hence applications does not have access to this when softdevice is enabled.&lt;/p&gt;
&lt;p&gt;2) Softdevice also uses RTC0, and app_timer library (which is application code) uses RTC1&lt;/p&gt;
&lt;p&gt;2) Normally timers_start in examples initializes application timers RTC1 and TIMER1 (in some cases) based on the use case. Please read the documentation on this in &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_timer.html&amp;amp;cp=4_0_0_3_48"&gt;infocenter&lt;/a&gt;, I think this topic is very well covered here in the forum also.&lt;/p&gt;
&lt;p&gt;About your problem having issues with timer after using&amp;nbsp;update_vbatt() function.&amp;nbsp;Either it is touching the app_timer registers (RTC1) or disabling its interrupt or maybe there is a hardfault or system reset in this function. I think you should be able to debug this once your run your code in debug mode and stepping through&amp;nbsp;update_vbatt function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>