<?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>CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12655/cpu-load-with-sd</link><description>Hello, 
 Is there any way to know CPU load (active vs sleep time) ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Mar 2016 06:04:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12655/cpu-load-with-sd" /><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48078?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2016 06:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7172fbc6-d087-4769-a92e-49bb94a755ae</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Load is active time divided by total time (active + idle / sleep).
You are right but in application, you cannot monitor sd activity (sd interrupts are at a higher level) so i need nordic to manage it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48083?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2016 02:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19f2e58a-c37b-4580-aa44-48194ce60b1b</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I still don&amp;#39;t get it. What special &amp;quot;load&amp;quot; you have in mind? If I get it right this isn&amp;#39;t anything like ARM Cortex-A or x86/AMD64 with out-of-order execution, variable clock, multicore, turbo etc. Here once the CPU works it executes the instructions pretty much linearly at constant clock. So the power consumption depends only on peripherals turned on (and I guess only radio have really dynamic power characteristic, right?). So unless your code has some disturbing busy wait loops it should be easy to see from the power consumption when you execute the code (= CPU is 100% busy) and when you go to sleep (assuming you use this standard architecture of asynchronous event-based BLE app with just app_sd_evt_wait() - or directly WFE - in the main program loop). Or you want to filter SoftDevice processing out of it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48082?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 20:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46402688-6dfc-4889-b332-13f1533a27dd</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Some CPU have a debug current probe integrated, maybe it&amp;#39;s a good idea for a future nRF53 :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48081?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 20:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05f085c2-088c-4655-9624-e31279cf35a4</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;So using a CPU load indicator could be easier to deploy and you can store it for different situations in a log.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48080?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 20:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d2bea04-ecc9-445f-9334-7797a707dd60</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;The idea is good, the difficulty is the precision of the measure and the current consumption pattern. Advanced improvements in your code modify current for the last micro ampers and current is not constant versus time so you have to integrate current (because voltage is just a quasi constant factor here) to get energy consumption or mean power (if you divide by time). Next thing you have to substract consumptions of RF frontend, ... there could be higher (when your code load is low) and not defined with enough precision so you are looking at a candle near the sun :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48079?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 20:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92c14485-2baf-42ac-a88d-438fe0f7664f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Wojtek&amp;#39;s idea came to me as first and obvious way how to measure it. Any idea why it couldn&amp;#39;t be precise enough to simply plug oscilloscope and measure power?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48077?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 18:28:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01e30486-39e8-4b88-b7a4-d7ed18c1881b</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;I don&amp;#39;t know how easy it will be to check on nRF52, but on nRF51 observing current consumption gives good understanding of active/sleep time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48074?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 12:11:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd255346-0cb0-4904-b683-ec517ea2cbf2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Good Info RK, I will try to explore few of those paths after easter vacation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48076?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2016 02:20:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:223a9ff9-25bb-4e1f-9a18-39df4b4a7e29</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;on the nRF52 you could use SysTick for that, since SysTick isn&amp;#39;t really used and, because it stops every time the processor goes to sleep, hard to find a good use for.&lt;/p&gt;
&lt;p&gt;You&amp;#39;d also expect on the nRF52 some of this information is available via the expanded debugging facilities. For a start, when debugging nRF52 stuff I get a CPU cycle count, pretty sure you can read that from code, you also have the option of trace and SWO output. I enabled it once and CrossWorks chewed the data and gave me some kind of readable output but I haven&amp;#39;t spent much time on it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CPU load (with SD) ?</title><link>https://devzone.nordicsemi.com/thread/48075?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2016 21:50:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f71b7e75-d09c-49af-8011-43b68a5d9084</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am getting more and more motivated to create a library with RTC1 and TIMER1 in counter mode to maintain system time which should work in all modes. It should be then easy to calculate the load if you diff system time before going to sleep and just after waking up (percentage diff between system time before and after __WFE instruction)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>