<?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>topic Re: How to compute(display) cycle consumed by each instruction, when feeding multiple instructions as interrupt? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623224#M24472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="294709" data-username="himanshudoshi" href="https://community.nxp.com/people/himanshudoshi"&gt;HIMANSHU DOSHI&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The Techinique 3: Using the MCU timer is suitably no matter which IDE you choose.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-03-08_14-30-22.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16194iDBF3EE89383B5230/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-03-08_14-30-22.jpg" alt="2017-03-08_14-30-22.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 1&lt;/P&gt;&lt;P&gt;And you also can find the set of instructions and their cycle counts in the related Cortex-M core's technical reference manual, you can find the technical reference manual in the link below.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/CHDDIGAC.html" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/CHDDIGAC.html"&gt;ARM Information Center&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Mar 2017 06:31:42 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2017-03-08T06:31:42Z</dc:date>
    <item>
      <title>How to compute(display) cycle consumed by each instruction, when feeding multiple instructions as interrupt?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623221#M24469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kindly, help me out as I wanna display the cycles computed by each instruction in sequence of instructions as input&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 16:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623221#M24469</guid>
      <dc:creator>himanshudoshi</dc:creator>
      <dc:date>2017-03-06T16:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute(display) cycle consumed by each instruction, when feeding multiple instructions as interrupt?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623222#M24470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="294709" data-username="himanshudoshi" href="https://community.nxp.com/people/himanshudoshi"&gt;HIMANSHU DOSHI&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 微软雅黑, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 微软雅黑, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"&gt;You can try these method to measure the the elapsed time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 微软雅黑, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"&gt;&lt;A class="link-titled" href="https://www.iar.com/support/resources/articles/techniques-for-measuring-the-elapsed-time/" title="https://www.iar.com/support/resources/articles/techniques-for-measuring-the-elapsed-time/"&gt;IAR Techniques for measuring the elapsed time&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 02:12:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623222#M24470</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-03-07T02:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute(display) cycle consumed by each instruction, when feeding multiple instructions as interrupt?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623223#M24471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;‌, Thank you very much for your effort. I got the point, u wanna coney. But, I am not able to implement into LPCXpresso IDE. Is it possible for you to write a demo code for me. That will be great help for me. My aim is get the time display on which the interrupt is going to perform into the MCU. And trace/display the cycles consumed by each instruction. This is my piece of code. What I want is to note down the exact time on which the _WFI(); is turning on. And also the number of cycle taken by each of the instruction (in our case ADD,NOP,ADD). So, I want to note down the cycle per instruction and the time stamps in micro/nano seconds on which _WFI(); is goin to start. Also, it will be a great help if we can get/display these things on the console window out of Debug mode or in real-time mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;#include "board.h"&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;#include &amp;lt;time.h&amp;gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;&lt;SPAN&gt;#define TICKRATE_HZ (1)&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN&gt;/* 10 ticks per second */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;&lt;DIV style="background-color: #ffffff;"&gt;void SysTick_Handler(void)&lt;/DIV&gt;&lt;DIV style="background-color: #ffffff;"&gt;{&lt;/DIV&gt;&lt;DIV style="background-color: #ffffff;"&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"ADD R6, R5, R4\t\n"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"NOP\t\n"&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"ADD R6, R5, R4\t\n"&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;}&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;/* Main application entry point */&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;int main(void)&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;{&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;int loop = 1;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;SystemCoreClockUpdate();&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;Board_Init();&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;Board_LED_Set(0, false); //0&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;asm(&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"MOV R4,#0x0\t\n"&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"MOV R5,#0x0\t\n"&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"MOV R6,#0x0\t\n"&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;);&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;//SysTick_Handler;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;/* Enable SysTick Timer */&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;SysTick_Config(SystemCoreClock / TICKRATE_HZ);&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;printf("hello world.\r\n");&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;while (1) {&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&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;&amp;nbsp;&amp;nbsp;__WFI();&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &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;&lt;/SPAN&gt;}&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;return 0;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;}&lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #000000; font-size: small;"&gt;Kindly, reply me thank you very much.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 13:11:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623223#M24471</guid>
      <dc:creator>himanshudoshi</dc:creator>
      <dc:date>2017-03-07T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute(display) cycle consumed by each instruction, when feeding multiple instructions as interrupt?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623224#M24472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="294709" data-username="himanshudoshi" href="https://community.nxp.com/people/himanshudoshi"&gt;HIMANSHU DOSHI&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The Techinique 3: Using the MCU timer is suitably no matter which IDE you choose.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-03-08_14-30-22.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16194iDBF3EE89383B5230/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-03-08_14-30-22.jpg" alt="2017-03-08_14-30-22.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 1&lt;/P&gt;&lt;P&gt;And you also can find the set of instructions and their cycle counts in the related Cortex-M core's technical reference manual, you can find the technical reference manual in the link below.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/CHDDIGAC.html" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/CHDDIGAC.html"&gt;ARM Information Center&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:31:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-compute-display-cycle-consumed-by-each-instruction-when/m-p/623224#M24472</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-03-08T06:31:42Z</dc:date>
    </item>
  </channel>
</rss>

