Kindly, help me out as I wanna display the cycles computed by each instruction in sequence of instructions as input
Hi HIMANSHU DOSHI,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
You can try these method to measure the the elapsed time.
IAR Techniques for measuring the elapsed time
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hii jeremyzhou, 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.
The Techinique 3: Using the MCU timer is suitably no matter which IDE you choose.
Fig 1
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.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------