<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPCXpresso IDE中的主题 Re: cortex-m0 instruction cycle count</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538810#M6205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rmteo on Sun Apr 24 08:00:13 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the IDE have a cycle counter when in debug mode similar to below?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 21:51:41 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T21:51:41Z</dc:date>
    <item>
      <title>cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538804#M6199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vasanth on Sat Apr 23 02:57:17 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hai&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; While debugging with lpc13xx i used to find the elapsed instruction cycles using cycle and cycledelta core registers. I see none of those registers in lpc1114. Probably the cm0 core doesn't have advanced debugging core registers like cm3. Is there a way to find the elapsed time in cm0 using the debugger? or suggest me any other means.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538804#M6199</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538805#M6200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fastmapper on Sat Apr 23 07:57:37 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For short code sequences, you could use the assembly language and the cycle counts for each instruction documented in section 3.3 of the Cortex-M0 Technical Reference Manual (&lt;/SPAN&gt;&lt;A href="http://"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0432c/index.html&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For longer code sequences, you could use a timer that is not used by your application.&amp;nbsp; Simply configure the timer with a prescale of 1 and start it counting at the beginning of your application, then read the timer value at the start and end of the code to be timed.&amp;nbsp; The difference in the counts will tell you how much time elapsed between timer reads.&amp;nbsp; Since this technique modifies your code, it will not generally provide one cycle precision, but it can get pretty close.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538805#M6200</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538806#M6201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Apr 23 08:10:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;A common way to measure times is SysTick timer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
volatile unsigned int timer=0;
void SysTick_Handler(void)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //SysTick interrupt handler
{
 timer++;
}

unsigned int time;
#define systick_start&amp;nbsp; SysTick-&amp;gt;VAL=10E6;SysTick-&amp;gt;CTRL|=SysTick_CTRL_ENABLE_Msk;
#define systick_stop&amp;nbsp;&amp;nbsp; SysTick-&amp;gt;CTRL&amp;amp;=~(SysTick_CTRL_ENABLE_Msk);time = 10E6-SysTick-&amp;gt;VAL;

//init SysTick
 SysTick_Config(10E6);&amp;nbsp; // Setup SysTick Timer
 systick_stop;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and stop it&amp;nbsp; again&amp;nbsp; 
......&amp;nbsp; 
[COLOR=Red]systick_start;
&amp;nbsp;&amp;nbsp; //time to measure
[/COLOR][COLOR=Red]systick_stop;
[/COLOR]&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;1. If you debug your program, SysTick isn't stopping, so don't suspend your program between systick_start and systick_stop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. SysTick is working with 24bit values, so don't set its values higher than 33.55E6.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. A few cycles are needed to stop SysTick, so work relative.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538806#M6201</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538807#M6202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Sat Apr 23 11:09:21 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi vasanth,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is something that was posted earlier on another thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://knowledgebase.nxp.com/showpost.php?p=6719&amp;amp;postcount=8&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It may be the method you were using with the lpc13xx series but I thought it would be good to post it here for continuity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fastmappers link is a good one.&amp;nbsp; I don't know if the LPC1114 has this implemented as fully as the&amp;nbsp; lpc13xx but look for the DWT in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need more coffee so I hope this made sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: After reading the TRM it appears that the counters are not implemented in the LPC1114 (M0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT2: I forgot to mention that I like Zero's method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538807#M6202</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538808#M6203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Apr 23 12:27:37 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;DWT is used for Core Registers cycle counter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the reason why there's no cycle counter for M0 in LPCXpresso.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538808#M6203</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538809#M6204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Sat Apr 23 12:33:17 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;DWT is used for Core Registers cycle counter.&lt;BR /&gt; &lt;BR /&gt;That's the reason why there's no cycle counter for M0 in LPCXpresso.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tip, I should have looked in LPCXpresso as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538809#M6204</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538810#M6205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rmteo on Sun Apr 24 08:00:13 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the IDE have a cycle counter when in debug mode similar to below?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538810#M6205</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538811#M6206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Apr 24 08:05:42 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;No, it's LPCXpresso and M0 (not M3).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538811#M6206</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538812#M6207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rmteo on Sun Apr 24 08:15:44 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, does the LPCXpresso IDE have a cycle counter when in debug mode similar to below?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538812#M6207</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538813#M6208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Apr 24 08:20:47 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Again: No&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538813#M6208</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: cortex-m0 instruction cycle count</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538814#M6209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rmteo on Sun Apr 24 08:43:55 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;That's too bad.&amp;nbsp; Sure would make cycle counting so easy just using breakpoints.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/cortex-m0-instruction-cycle-count/m-p/538814#M6209</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:51:43Z</dc:date>
    </item>
  </channel>
</rss>

