<?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: PMSM Motor Control using NXP Model-Based Design Toolbox</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1576537#M7964</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/100054"&gt;@Irina_Costachescu&lt;/a&gt;&amp;nbsp;first of all thank you for your reply, I hope you are well.&lt;/P&gt;&lt;P&gt;After your reply I tried to run again the PMSM example to be able to generate C code. Since the example is designed specifically for the &lt;STRONG&gt;S32K344-Q257&lt;/STRONG&gt; microcontroller, in the target hardware resources in simulink&lt;STRONG&gt; I selected that microprocessor as my target&lt;/STRONG&gt; and &lt;STRONG&gt;EB tresos&lt;/STRONG&gt; as the &lt;STRONG&gt;configuration tool&lt;/STRONG&gt; as we can see in the following pictures:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hardware_part_select.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205930i61E3E456712F5BC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="hardware_part_select.PNG" alt="hardware_part_select.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tool_select.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205931iC947F225733A1520/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tool_select.PNG" alt="Tool_select.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After trying to generate and deploy the code in my EVB, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="after_build.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205935iF3C282BE76B0989F/image-size/large?v=v2&amp;amp;px=999" role="button" title="after_build.PNG" alt="after_build.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I tried to open the configuration in EB tresos in order to change the configurations in the tool to see if it could solve my problem and an error that I got in the Block Parameters: "Hardware_Interrupt_Handler2" saying that all callbacks are NULL_PTR&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NULL_Callbacks.PNG" style="width: 555px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205949i50373EED4C5563A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="NULL_Callbacks.PNG" alt="NULL_Callbacks.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EB tresos was able to open the project configuration, but after the use of the tool, we must refresh in order to update the configurations, and I got the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error_on_RefreshConfiguration.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205943iBF3D497231D0022C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error_on_RefreshConfiguration.PNG" alt="Error_on_RefreshConfiguration.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; After the "ebtOpen" error show, I press ok, and simulink stays forever analyzing the Tresos Project as you can see:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="analyzing forever.PNG" style="width: 371px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205948i226F0139C4070DB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="analyzing forever.PNG" alt="analyzing forever.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I will also attach the log errors that I got from the MATLAB console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In conclusion I cannot get the C code generated nor update the project configurations in EB tresos.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do next, just to get a clean project build and to be able to generate C code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With best regards,&lt;/P&gt;&lt;P&gt;Simão Serrano&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2023 11:23:19 GMT</pubDate>
    <dc:creator>Simao</dc:creator>
    <dc:date>2023-01-03T11:23:19Z</dc:date>
    <item>
      <title>PMSM Motor Control using NXP Model-Based Design Toolbox</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1564485#M7909</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello NXP Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to spin a PMSM motor using your Motor Control algorithms with Simulink, Embedded Coder and Model-Based Design Toolbox for S32K3xx, based on the NXP webinar for the S32K3xx family:&lt;/P&gt;&lt;P&gt;&lt;A href="https://protect-us.mimecast.com/s/mflqCyPOgrt9KOjLsN10kF" target="_blank" rel="noopener"&gt;https://www.nxp.com/design/training/a-model-based-design-mbdt-environment-for-motor-control-algorithm-development:TIP-MBDT-MODEL-MOTOR-CONTROL-ALGORITHM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I am having several issues&amp;nbsp;(which I describe below). IOI was hoping you could please give me some pointers to overcome it and get the motor running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;MATLAB 2022b&lt;/STRONG&gt; and &lt;STRONG&gt;S32 Design Studio 3.5&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Regarding &lt;STRONG&gt;RTD&lt;/STRONG&gt; and &lt;STRONG&gt;MBDT&lt;/STRONG&gt;, I am using &lt;STRONG&gt;S32K3 Real-Time Drivers AUTOSAR 4.4 Version 2.0.1 &lt;/STRONG&gt;in S32 Design Studio, but the &lt;STRONG&gt;SW32K3_RTD_4.4_2.0.0 &lt;/STRONG&gt;is delivered with the toolbox&lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;Model-Based Design Toolbox for S32K3xx 1.2.0 &lt;/STRONG&gt;is being used, all downloaded from NXP website.&lt;/P&gt;&lt;P&gt;The EVB that is being used for test purposes is the &lt;STRONG&gt;S32K312-Q172 (I also have tried with the&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;S32K344-Q-172)&lt;/STRONG&gt;&lt;/SPAN&gt;. (These are "generic" EVBs; not the one with the small Brushless motor, because that seems to be unavailable).&amp;nbsp;&lt;/P&gt;&lt;P&gt;After installing MATLAB and the needed Add-Ons, we executed a toolbox script to generate the appropriate settings for the installation environment, as indicated in the &lt;STRONG&gt;Model-Based Design Toolbox quick start guide for the S32K3xx&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Next, using the example for the Dio project, I was able to generate, build and deploy the Code in the S32K312-Q172 EVB with success, and this way assure that the configurations needed were performed correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the next step I have selected the PMSM Motor Control example from Simulink, using Library Browser.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Simulink Model" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202982iEC8C874841D71434/image-size/large?v=v2&amp;amp;px=999" role="button" title="simulink_model.PNG" alt="Simulink Model" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Simulink Model&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the hardware-part selection window configuration, I chose the correct EVB, as you can see below, and the configuration process is using S32 Design Studio as the configuration tool instead of EB Tresos.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hardware-Part Selection" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202983i71F62F865CB4ECE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Hardware_Part_selection.PNG" alt="Hardware-Part Selection" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Hardware-Part Selection&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to generate, build and deploy the Code into the EVB, during the build process, Simulink gives a rebuild reason and several errors as you can see below:&lt;/P&gt;&lt;P&gt;“&lt;STRONG&gt;Code Generation Information file does not exist&lt;/STRONG&gt;”:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Diagnostic Viewer" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202985iB425FA3C71DCB155/image-size/large?v=v2&amp;amp;px=999" role="button" title="diagnostic_viewer.PNG" alt="Diagnostic Viewer" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Diagnostic Viewer&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 1/2" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202986iA2652A485560A527/image-size/large?v=v2&amp;amp;px=999" role="button" title="MATLAB_error_1.PNG" alt="Error 1/2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Error 1/2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 2/2" style="width: 962px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202987i66B253D1E34E2A79/image-size/large?v=v2&amp;amp;px=999" role="button" title="MATLAB_error_2.PNG" alt="Error 2/2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Error 2/2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried other examples, such as PWM, on the same EVB &lt;STRONG&gt;that work properly&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to understand:&lt;/P&gt;&lt;P&gt;- Can the newer version of the &lt;STRONG&gt;Real Time Drivers&lt;/STRONG&gt; cause some incompatibility issues with the motor control lib example?&lt;/P&gt;&lt;P&gt;- The error that I have is related with the provided example? (if this is true, can you provide the correct example for the &lt;STRONG&gt;EVB in consideration&lt;/STRONG&gt;?)&lt;/P&gt;&lt;P&gt;- Do I need to perform any other action, besides the ones that I already did, in order to get the example working using EVB's&amp;nbsp;&lt;STRONG&gt;S32K312-Q172 or&amp;nbsp;&lt;SPAN&gt;S32K344-Q-172&lt;/SPAN&gt;&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;- I have also found an existing post that I thought it could help me, but I &lt;STRONG&gt;can't reach step 2&lt;/STRONG&gt;, since the build is not successful. (&lt;STRONG&gt;NXP Post&lt;/STRONG&gt;: &lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Export-generated-projects-in-MBDT-for-s32k3XX/m-p/1405533" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Export-generated-projects-in-MBDT-for-s32k3XX/m-p/1405533&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please note that the goal here is to use sensorless FOC (we have a circuit with 3 phase current shunts if that can be used), but we do not want to use FOC with Hall sensors. (Hall sensors are excluded from our application).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Best Regards,&lt;/P&gt;&lt;P&gt;Simão Serrano&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 14:46:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1564485#M7909</guid>
      <dc:creator>Simao</dc:creator>
      <dc:date>2022-12-05T14:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: PMSM Motor Control using NXP Model-Based Design Toolbox</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1570297#M7927</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207839"&gt;@Simao&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please note that the PMSM example delivered within MBDT for S32K3 v1.2.0 is designed specifically for the S32K344-Q257 processor, having a EB Tresos custom configuration project associated to it. For more details on what MBDT custom or default configuration projects mean and how they are used for applications development, please check the details provided in this &lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Motor-Control-Errors-Example-Project-MBDT-S32K3/m-p/1532703/highlight/true#M7718" target="_self"&gt;thread&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Now, to address the mentioned questions specifically:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. MBDT for S32K3 uses the RTD delivered within the package for building the models and creating the executable files which are downloaded on the target. So, the step of building the model in the Simulink environment should not be affected by the packages installed in S32DS - they are independent application development environments.&lt;BR /&gt;&lt;BR /&gt;2. If the other S32K312 examples were able to be built and downloaded on the target without any issues, then the problem you are facing might be related only to the PMSM example indeed.&lt;BR /&gt;&lt;BR /&gt;3. As previously mentioned, I think that the error occurs because the PMSM example is designed specifically for the S32K344-Q257 part, using an EB Tresos configuration. When you change the Hardware Part - to S32K312-Q172 EVB, and also the configuration tool to S32CT, the default configuration project corresponding to this part (S32K312) will be used by the model. However, this S32K312 configuration does not contain all the setting necessary for a motor control application. Currently MBDT does not provide motor control examples on S32K312, hence, to fit the particularities of your application, you would need to update the project in the chosen external configuration tool.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Irina&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 08:41:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1570297#M7927</guid>
      <dc:creator>Irina_Costachescu</dc:creator>
      <dc:date>2022-12-15T08:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: PMSM Motor Control using NXP Model-Based Design Toolbox</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1576537#M7964</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/100054"&gt;@Irina_Costachescu&lt;/a&gt;&amp;nbsp;first of all thank you for your reply, I hope you are well.&lt;/P&gt;&lt;P&gt;After your reply I tried to run again the PMSM example to be able to generate C code. Since the example is designed specifically for the &lt;STRONG&gt;S32K344-Q257&lt;/STRONG&gt; microcontroller, in the target hardware resources in simulink&lt;STRONG&gt; I selected that microprocessor as my target&lt;/STRONG&gt; and &lt;STRONG&gt;EB tresos&lt;/STRONG&gt; as the &lt;STRONG&gt;configuration tool&lt;/STRONG&gt; as we can see in the following pictures:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hardware_part_select.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205930i61E3E456712F5BC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="hardware_part_select.PNG" alt="hardware_part_select.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tool_select.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205931iC947F225733A1520/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tool_select.PNG" alt="Tool_select.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After trying to generate and deploy the code in my EVB, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="after_build.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205935iF3C282BE76B0989F/image-size/large?v=v2&amp;amp;px=999" role="button" title="after_build.PNG" alt="after_build.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I tried to open the configuration in EB tresos in order to change the configurations in the tool to see if it could solve my problem and an error that I got in the Block Parameters: "Hardware_Interrupt_Handler2" saying that all callbacks are NULL_PTR&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NULL_Callbacks.PNG" style="width: 555px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205949i50373EED4C5563A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="NULL_Callbacks.PNG" alt="NULL_Callbacks.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EB tresos was able to open the project configuration, but after the use of the tool, we must refresh in order to update the configurations, and I got the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error_on_RefreshConfiguration.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205943iBF3D497231D0022C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error_on_RefreshConfiguration.PNG" alt="Error_on_RefreshConfiguration.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; After the "ebtOpen" error show, I press ok, and simulink stays forever analyzing the Tresos Project as you can see:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="analyzing forever.PNG" style="width: 371px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/205948i226F0139C4070DB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="analyzing forever.PNG" alt="analyzing forever.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I will also attach the log errors that I got from the MATLAB console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In conclusion I cannot get the C code generated nor update the project configurations in EB tresos.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do next, just to get a clean project build and to be able to generate C code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With best regards,&lt;/P&gt;&lt;P&gt;Simão Serrano&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 11:23:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PMSM-Motor-Control-using-NXP-Model-Based-Design-Toolbox/m-p/1576537#M7964</guid>
      <dc:creator>Simao</dc:creator>
      <dc:date>2023-01-03T11:23:19Z</dc:date>
    </item>
  </channel>
</rss>

