<?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: Execution Measurement on MBDT KVx in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377042#M6745</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/190527"&gt;@CauTran&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We currently don't have enabled for the toolbox the Code execution profiling support, but you can try to use the Timer blocks to measure the execution time of a subsystem.&lt;/P&gt;
&lt;P&gt;You can configure for e.g the PIT timer from MCUX configuration Tool in free running mode (set the period to the max value)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_5-1637841903292.png" style="width: 440px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163221iD7A411A7A8725DF5/image-dimensions/440x336?v=v2" width="440" height="336" role="button" title="nxa11767_5-1637841903292.png" alt="nxa11767_5-1637841903292.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the model, place all your code in a subsystem for e.g; add the Start/Stop Timer block - one block that will start the timer and another to stop the timer and a register read block to read the CVAL0 value (if channel 0 enabled). Add priorities to the blocks and subsystems (right click on the block/subsystem and set Priority)- Start Timer higher priority ( 0 - is highest priority), then your subsystem that you want to measure, the Read Register block and last Stop Timer block. You need to read first the CVAL0 register and then stop the Timer, because the StopTimer call will reset the registers.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_0-1637840664693.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163216iCEF78B9DD2D0BCB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nxa11767_0-1637840664693.png" alt="nxa11767_0-1637840664693.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to get number of ticks you just need to substract from max timer value the value of CVAL0 (PIT timer counts down - at start is equal with period set in configuration tool and goes down from there).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_4-1637841749910.png" style="width: 430px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163220iE7EB73AD495E5FCD/image-dimensions/430x212?v=v2" width="430" height="212" role="button" title="nxa11767_4-1637841749910.png" alt="nxa11767_4-1637841749910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Alexandra&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 12:05:28 GMT</pubDate>
    <dc:creator>nxa11767</dc:creator>
    <dc:date>2021-11-25T12:05:28Z</dc:date>
    <item>
      <title>Execution Measurement on MBDT KVx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1375490#M6734</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to measure the execution time for my application based on MBDT KVx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this one?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:56:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1375490#M6734</guid>
      <dc:creator>CauTran</dc:creator>
      <dc:date>2021-11-23T08:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Measurement on MBDT KVx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377042#M6745</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/190527"&gt;@CauTran&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We currently don't have enabled for the toolbox the Code execution profiling support, but you can try to use the Timer blocks to measure the execution time of a subsystem.&lt;/P&gt;
&lt;P&gt;You can configure for e.g the PIT timer from MCUX configuration Tool in free running mode (set the period to the max value)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_5-1637841903292.png" style="width: 440px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163221iD7A411A7A8725DF5/image-dimensions/440x336?v=v2" width="440" height="336" role="button" title="nxa11767_5-1637841903292.png" alt="nxa11767_5-1637841903292.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the model, place all your code in a subsystem for e.g; add the Start/Stop Timer block - one block that will start the timer and another to stop the timer and a register read block to read the CVAL0 value (if channel 0 enabled). Add priorities to the blocks and subsystems (right click on the block/subsystem and set Priority)- Start Timer higher priority ( 0 - is highest priority), then your subsystem that you want to measure, the Read Register block and last Stop Timer block. You need to read first the CVAL0 register and then stop the Timer, because the StopTimer call will reset the registers.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_0-1637840664693.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163216iCEF78B9DD2D0BCB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nxa11767_0-1637840664693.png" alt="nxa11767_0-1637840664693.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to get number of ticks you just need to substract from max timer value the value of CVAL0 (PIT timer counts down - at start is equal with period set in configuration tool and goes down from there).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nxa11767_4-1637841749910.png" style="width: 430px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163220iE7EB73AD495E5FCD/image-dimensions/430x212?v=v2" width="430" height="212" role="button" title="nxa11767_4-1637841749910.png" alt="nxa11767_4-1637841749910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Alexandra&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 12:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377042#M6745</guid>
      <dc:creator>nxa11767</dc:creator>
      <dc:date>2021-11-25T12:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Measurement on MBDT KVx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377295#M6748</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/123994"&gt;@nxa11767&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give me this example for that topic?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 01:37:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377295#M6748</guid>
      <dc:creator>CauTran</dc:creator>
      <dc:date>2021-11-26T01:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Measurement on MBDT KVx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377402#M6750</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/190527"&gt;@CauTran&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;See attached the example. It has also a freemaster block to see the counted ticks variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Alexandra&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 05:21:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-Measurement-on-MBDT-KVx/m-p/1377402#M6750</guid>
      <dc:creator>nxa11767</dc:creator>
      <dc:date>2021-11-26T05:21:53Z</dc:date>
    </item>
  </channel>
</rss>

