<?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>nRF52832 DK clk/interrupt is un-deterministic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14274/nrf52832-dk-clk-interrupt-is-un-deterministic</link><description>I am trying to trigger some functions based on some pre-determined timings. I tried to do that using nrf_delay_us and also using timer0 interrupts, but both are giving me un-deterministic timings. So for a delay of 1 second using the delay or the timer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Jun 2016 10:46:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14274/nrf52832-dk-clk-interrupt-is-un-deterministic" /><item><title>RE: nRF52832 DK clk/interrupt is un-deterministic</title><link>https://devzone.nordicsemi.com/thread/54475?ContentTypeID=1</link><pubDate>Fri, 03 Jun 2016 10:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac1cb389-860f-4075-9e44-f521ae1be945</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;999,980 us is pretty close to 1 second. You will have inaccuracies in the clock. If you are not starting the crystal (HFXO) you will run off the internal oscillator (HFINT) which have a typical accuracy of 1.5%, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/clock.html?cp=2_2_0_17_3_0#unique_1900851505"&gt;here&lt;/a&gt;. In comparison, the crystal on the DK have accuracy of 20ppm. With 1.5% accuracy you should expect the timing to be within 1500us when counting one second, with 20ppm expect up to 20us error.&lt;/p&gt;
&lt;p&gt;Also if you are using delays, the time between functions will be the time it takes to execute the function plus the delay time. If you use timer peripheral and clear the timer using shortcuts you should not expect added time because of function execution.&lt;/p&gt;
&lt;p&gt;In constant latency mode the CPU wakeup latency and the PPI task response will be constant and kept at a minimum. So it will only apply if the chip enters sleep (__WFE()). Constant latency mode will increase the sleep power consumption.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>