<?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>Sistick timer extension in nRF5 SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109901/sistick-timer-extension-in-nrf5-sdk</link><description>Dear DevZone, 
 
 I am investigating the possibility to use the sistick hw timer in a nr5 SDK v15.3 project, running on a nrf52840 uC. infocenter.nordicsemi.com/index.jsp 
 My final goal would be to print a timestamp in a log file. However, the documentation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Apr 2024 12:23:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109901/sistick-timer-extension-in-nrf5-sdk" /><item><title>RE: Sistick timer extension in nRF5 SDK</title><link>https://devzone.nordicsemi.com/thread/477099?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 12:23:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c85eee8d-a4eb-434f-a1e6-20a518bf2f8d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Gianluca,&lt;/p&gt;
&lt;p&gt;There is not much you can do with that. However, for the use case you describe I would normally avoid the systick timer. Instead, the allmost all applications use an RTC for the app_timer library, and then you could instead make sure you set&amp;nbsp;APP_TIMER_KEEPS_RTC_ACTIVE to 1 in your sdk_config.h. That way the app timer always runs,&amp;nbsp;and you can use that to keep track of time.&lt;/p&gt;
&lt;p&gt;You still need to handle wrap-arounds though, as that is not handled by the app timer. Alternatively, if useing the&amp;nbsp;app_timer2 implementation, you could hook into the internal 64 bit counter, which in practice will never wrap around (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67006/how-to-generate-unix-epoch-time-stamp-using-nrf52840/274505"&gt;this post&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>