<?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>Model-Based Design Toolbox (MBDT)のトピックRe: Execution profiling PMSM Closed Loop Simulink Example on MCSXTE2BK142</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1744812#M8626</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/223913"&gt;@DevMotorControl&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for your post!&lt;/P&gt;
&lt;P&gt;The explanations provided in the post you mentioned&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-is-the-Tick-duration-while-profiling-code-in-PIL/m-p/1636614" target="_self"&gt;What is the Tick duration while profiling code in PIL ?&lt;/A&gt;&amp;nbsp;are valid and the&amp;nbsp;&lt;STRONG&gt;SPLLDIV2&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;is indeed 20MHz. But the SPLLDIV2 does not mean that the SPLL is automatically divided by 2, is the second divider that could be applied to the SPLL value. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1698100475312.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246461i2B0824C346A340C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_0-1698100475312.png" alt="mariuslucianand_0-1698100475312.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In our default configuration delivered with MBDT, as explained in the referred article, the SPLLDIV2 is actually the SPLL with a division factor of 4. So the PIL/Profiler timer is actually 20MHz, with a tick taking 50ns. I could confirm this, by using a simple program, which sets a pin high, executes a sequence, and then sets the pin to a low state. If we measure the execution time with an external logic analyzer and we also measure the execution time using the profiler block, we could also confirm that the frequency is 20Mhz.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_1-1698100887092.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246462i4F50FFC1493F8DD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="mariuslucianand_1-1698100887092.png" alt="mariuslucianand_1-1698100887092.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the FreeMASTER examples coming with the Motor Control, I think indeed that the value of the translation factor between ticks and ns needs to be adjusted to be 0.05 and not 0.025 as it is now. This comes from the early development time, when most likely the profiler had a value of 40Mhz but they were adjusted in a previous release.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2023 22:44:14 GMT</pubDate>
    <dc:creator>mariuslucianand</dc:creator>
    <dc:date>2023-10-23T22:44:14Z</dc:date>
    <item>
      <title>Execution profiling PMSM Closed Loop Simulink Example on MCSXTE2BK142</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1744496#M8624</link>
      <description>&lt;DIV class=""&gt;Currently, I am developing with the MCSXTE2BK142. I am following the example Simulink model from the MBDT toolbox.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;BR /&gt;\NXP_MBDToolbox_S32K1xx\S32_Examples\s32k14x\mc\MCSXTE2BK142\PMSM_Demo\PMSM_ClosedLoop&lt;BR /&gt;&lt;BR /&gt;I am wondering how the execution profiling of the fast loop is done using this model. In the freemaster tool I found that a conversion is done for a number of ticks to an execution time in microseconds. However, if I look at the configuration of SPLL I found that instead of a 40Mhz(according to the conversion done in freemaster) based tick counter it is a 20MHz based tick counter. Did I deduce the settings of SPLL wrong or is there an error in the example?&lt;BR /&gt;&lt;BR /&gt;Having a 40MHZ based tick or a 20 MHz based tick counter is a big deal as it would mean that the processor load is a factor 2 higher than what is suggested according to the simulink example.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I also looked on the forum where the same deduction to a 20MHz clock was made:&amp;nbsp;&lt;A title="What is the Tick duration while profiling code in PIL" href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-is-the-Tick-duration-while-profiling-code-in-PIL/m-p/1636614" target="_blank" rel="noopener"&gt;What-is-the-Tick-duration-while-profiling-code-in-PIL&amp;nbsp;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Oct 2023 12:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1744496#M8624</guid>
      <dc:creator>DevMotorControl</dc:creator>
      <dc:date>2023-10-23T12:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Execution profiling PMSM Closed Loop Simulink Example on MCSXTE2BK142</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1744812#M8626</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/223913"&gt;@DevMotorControl&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for your post!&lt;/P&gt;
&lt;P&gt;The explanations provided in the post you mentioned&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/What-is-the-Tick-duration-while-profiling-code-in-PIL/m-p/1636614" target="_self"&gt;What is the Tick duration while profiling code in PIL ?&lt;/A&gt;&amp;nbsp;are valid and the&amp;nbsp;&lt;STRONG&gt;SPLLDIV2&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;is indeed 20MHz. But the SPLLDIV2 does not mean that the SPLL is automatically divided by 2, is the second divider that could be applied to the SPLL value. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1698100475312.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246461i2B0824C346A340C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_0-1698100475312.png" alt="mariuslucianand_0-1698100475312.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In our default configuration delivered with MBDT, as explained in the referred article, the SPLLDIV2 is actually the SPLL with a division factor of 4. So the PIL/Profiler timer is actually 20MHz, with a tick taking 50ns. I could confirm this, by using a simple program, which sets a pin high, executes a sequence, and then sets the pin to a low state. If we measure the execution time with an external logic analyzer and we also measure the execution time using the profiler block, we could also confirm that the frequency is 20Mhz.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_1-1698100887092.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246462i4F50FFC1493F8DD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="mariuslucianand_1-1698100887092.png" alt="mariuslucianand_1-1698100887092.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the FreeMASTER examples coming with the Motor Control, I think indeed that the value of the translation factor between ticks and ns needs to be adjusted to be 0.05 and not 0.025 as it is now. This comes from the early development time, when most likely the profiler had a value of 40Mhz but they were adjusted in a previous release.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 22:44:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1744812#M8626</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2023-10-23T22:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Execution profiling PMSM Closed Loop Simulink Example on MCSXTE2BK142</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1745063#M8627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72088"&gt;@mariuslucianand&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Your post confirms my deductions. Thanks for your reply!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Execution-profiling-PMSM-Closed-Loop-Simulink-Example-on/m-p/1745063#M8627</guid>
      <dc:creator>DevMotorControl</dc:creator>
      <dc:date>2023-10-24T07:15:30Z</dc:date>
    </item>
  </channel>
</rss>

