<?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>[SOLVED] CPU speed seems different with SDK or mbed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19619/solved-cpu-speed-seems-different-with-sdk-or-mbed</link><description>Hi, 
 I own a Redbearlab BLE Nano with a nrf51822. 
 I want to use it to drive some WS2812 rgb LED (neopixels), using precised timings for bit-banging. 
 Before driving the LED, I wanted to know what the execution speed of a single I/O toggle instruction</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Feb 2017 23:24:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19619/solved-cpu-speed-seems-different-with-sdk-or-mbed" /><item><title>RE: [SOLVED] CPU speed seems different with SDK or mbed</title><link>https://devzone.nordicsemi.com/thread/76364?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 23:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53a755a4-71d9-4883-9924-921dc499a110</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;No worries.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d try -O3 instead of -Os and see if it makes much difference, as it will reduce you code side, as -Os will favour speed over size&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [SOLVED] CPU speed seems different with SDK or mbed</title><link>https://devzone.nordicsemi.com/thread/76363?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 23:02:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:792a1398-a730-4f13-86d1-f5883ef86594</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;I&amp;#39;m not exactly sure as I&amp;#39;ve started off from a previous project of mine but it might have been based on the blinky one so that makes sense.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [SOLVED] CPU speed seems different with SDK or mbed</title><link>https://devzone.nordicsemi.com/thread/76362?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 21:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de169fcc-b209-4682-b744-23aebc3a243b</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Which example project are you using ?&lt;/p&gt;
&lt;p&gt;I checked all the makefiles in SDK 12.1.0 and only the blinky uses -O0 most the rest use -O3&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [SOLVED] CPU speed seems different with SDK or mbed</title><link>https://devzone.nordicsemi.com/thread/76361?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 18:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9559a2a2-5bfb-45ba-bcb1-f45be2c1f548</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;I found the solution.&lt;/p&gt;
&lt;p&gt;In case anyone gets the same issue trying to do bit-banging on the nrf51 : the problem was simply a lack of compiler optimization. I was compiling with -O0. When moved to -Os, the toggle is now done every 125ms.&lt;/p&gt;
&lt;p&gt;From there I am able to drive the LED using the RGB_Show function from &lt;a href="https://developer.mbed.org/questions/54210/RedBear-nRF51822-driving-NeoPixels/"&gt;https://developer.mbed.org/questions/54210/RedBear-nRF51822-driving-NeoPixels/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>