topic Help with the library elapsed_time for the time analysis of function in S32K
https://community.nxp.com/t5/S32K/Help-with-the-library-elapsed-time-for-the-time-analysis-of/m-p/1154914#M8184
<P>Hi community,</P><P>I have a question about the calculation of time of one function. <BR />I want to have some explanations because I don't understand very well how to perform the time analysis of the functions of my code. I need to know very well the time of execution of my code in order to comprehend the relationship between the frequency of CAN message.</P><P>I downloaded the example of S32K142_02_time_measure_01.7z from the website</P><P>"<A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta-p/1114941" target="_blank">https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta-p/1114941</A>"<BR /><BR />I want to know what is the unit of measurements of the variabile ARM_CM_DWT_CYCCNT. I need to calculate the time of the functions of my code. If the difference between two executions is equal to 415 and in my code I choose the SlowRunMode (Bus Clock, Core Clock and Sys Clock equal to 48MHz) I should calculate the ratio between 415/(48MHz) for the fact that the Core Clock is equal to 48MHz?</P><P>Thank you for your help</P><P>Best regards,</P><P>Paola</P>Thu, 17 Sep 2020 15:18:52 GMTp_decesare2020-09-17T15:18:52ZHelp with the library elapsed_time for the time analysis of function
https://community.nxp.com/t5/S32K/Help-with-the-library-elapsed-time-for-the-time-analysis-of/m-p/1154914#M8184
<P>Hi community,</P><P>I have a question about the calculation of time of one function. <BR />I want to have some explanations because I don't understand very well how to perform the time analysis of the functions of my code. I need to know very well the time of execution of my code in order to comprehend the relationship between the frequency of CAN message.</P><P>I downloaded the example of S32K142_02_time_measure_01.7z from the website</P><P>"<A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta-p/1114941" target="_blank">https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta-p/1114941</A>"<BR /><BR />I want to know what is the unit of measurements of the variabile ARM_CM_DWT_CYCCNT. I need to calculate the time of the functions of my code. If the difference between two executions is equal to 415 and in my code I choose the SlowRunMode (Bus Clock, Core Clock and Sys Clock equal to 48MHz) I should calculate the ratio between 415/(48MHz) for the fact that the Core Clock is equal to 48MHz?</P><P>Thank you for your help</P><P>Best regards,</P><P>Paola</P>Thu, 17 Sep 2020 15:18:52 GMThttps://community.nxp.com/t5/S32K/Help-with-the-library-elapsed-time-for-the-time-analysis-of/m-p/1154914#M8184p_decesare2020-09-17T15:18:52ZRe: Help with the library elapsed_time for the time analysis of function
https://community.nxp.com/t5/S32K/Help-with-the-library-elapsed-time-for-the-time-analysis-of/m-p/1155202#M8193
<P>Hi p_decesare,</P>
<P>Yes. Your calculation is correct.<BR />The unit of measurements of the variabile ARM_CM_DWT_CYCCNT is CORE_CLK cycles.<BR />For example: set a breakpoint at the end of elapsed_time_stop, you will see the CORE_CLK cycles the Code being measured.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="elapsed_time current.png" style="width: 999px;"><img src="https://community.nxp.com/t5/image/serverpage/image-id/125529i8475F3BA1F08F2A8/image-size/large?v=v2&px=999" role="button" title="elapsed_time current.png" alt="elapsed_time current.png" /></span></P>
<P>Best Regards,<BR />Robin</P>
<P>-----------------------------------------------------------------------------------------------------------------------<BR />Note: If this post answers your question, please click the Correct Answer button. Thank you!<BR />-----------------------------------------------------------------------------------------------------------------------</P>Fri, 18 Sep 2020 03:18:13 GMThttps://community.nxp.com/t5/S32K/Help-with-the-library-elapsed-time-for-the-time-analysis-of/m-p/1155202#M8193Robin_Shen2020-09-18T03:18:13Z