<?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 PIT Timer Problem in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752421#M1817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m currently on Lecture 10 (Open Loop with Speed Estimator) in your MPC5744P Model-Based BLDC Motor Control class, but I am stuck. It seems that in my Open Loop model, the PIT only fires 3 to 5 times at startup, and then stops (see attached FreeMASTER screenshot), and so the estimated speed is always zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To double check the PIT, I created a new model that only has a PIT on Channel 1, and increments a variable every time it is called. The model and FreeMASTER screenshot is attached. As you can see, the Test_Count variable is never changed, so it seems as though the PIT never fires and the ISR is never invoked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked the generated C source code files, and it looks like the PIT is getting initialized and called correctly. I also checked the intc_sw_vectable.c file (as per &lt;A _jive_internal="true" href="https://community.nxp.com/thread/386598"&gt;this issue&lt;/A&gt;, in which the poster’s description of the problem seems very similar), and the PIT ISRs are assigned the proper slots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you encountered this error before??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are details on my setup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hardware:&lt;/P&gt;&lt;P&gt;MPC5744P Dev Kit with DEVKIT-MOTORGD&lt;/P&gt;&lt;P&gt;BLDC motor with 3 Hall-Effect sensors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Software:&lt;/P&gt;&lt;P&gt;MATLAB R2016b&lt;/P&gt;&lt;P&gt;NXP Model Based Design Toolbox v2.0.0&lt;/P&gt;&lt;P&gt;S32DS Power v1.2 Compiler&lt;/P&gt;&lt;P&gt;FreeMASTER 2.0&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hotfixes 3 and 5 from &lt;/SPAN&gt;&lt;A class="jive-link-comment-small" href="https://community.nxp.com/thread/451804#comment-916493"&gt;https://community.nxp.com/thread/451804#comment-916493&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2017 01:30:19 GMT</pubDate>
    <dc:creator>jjacp</dc:creator>
    <dc:date>2017-12-01T01:30:19Z</dc:date>
    <item>
      <title>PIT Timer Problem</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752421#M1817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m currently on Lecture 10 (Open Loop with Speed Estimator) in your MPC5744P Model-Based BLDC Motor Control class, but I am stuck. It seems that in my Open Loop model, the PIT only fires 3 to 5 times at startup, and then stops (see attached FreeMASTER screenshot), and so the estimated speed is always zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To double check the PIT, I created a new model that only has a PIT on Channel 1, and increments a variable every time it is called. The model and FreeMASTER screenshot is attached. As you can see, the Test_Count variable is never changed, so it seems as though the PIT never fires and the ISR is never invoked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked the generated C source code files, and it looks like the PIT is getting initialized and called correctly. I also checked the intc_sw_vectable.c file (as per &lt;A _jive_internal="true" href="https://community.nxp.com/thread/386598"&gt;this issue&lt;/A&gt;, in which the poster’s description of the problem seems very similar), and the PIT ISRs are assigned the proper slots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you encountered this error before??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are details on my setup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hardware:&lt;/P&gt;&lt;P&gt;MPC5744P Dev Kit with DEVKIT-MOTORGD&lt;/P&gt;&lt;P&gt;BLDC motor with 3 Hall-Effect sensors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Software:&lt;/P&gt;&lt;P&gt;MATLAB R2016b&lt;/P&gt;&lt;P&gt;NXP Model Based Design Toolbox v2.0.0&lt;/P&gt;&lt;P&gt;S32DS Power v1.2 Compiler&lt;/P&gt;&lt;P&gt;FreeMASTER 2.0&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hotfixes 3 and 5 from &lt;/SPAN&gt;&lt;A class="jive-link-comment-small" href="https://community.nxp.com/thread/451804#comment-916493"&gt;https://community.nxp.com/thread/451804#comment-916493&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 01:30:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752421#M1817</guid>
      <dc:creator>jjacp</dc:creator>
      <dc:date>2017-12-01T01:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Timer Problem</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752422#M1818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I seemed to have fixed my issue. Somehow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;my stand-alone PIT model that I attached, I added a test variable that always increments, and the PIT started working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my Lec 10 model (Open Loop Control with Speed Estimator), I changed the PIT priority to 25 as set in the example Lec 10 model file, but I did not add a test counter variable--and now it's working. It's correctly estimating the speed as shown in SPD_RPM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 00:54:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752422#M1818</guid>
      <dc:creator>jjacp</dc:creator>
      <dc:date>2017-12-02T00:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Timer Problem</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752423#M1819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jjacp"&gt;jjacp&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a bit strange. I tried your original model on my setup (Matlab 2017a + MPC5744P DevKit) and it works fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56465i6C06FE115CCAFBC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56507iB85A2A6CA2237383/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As a hint - try to delete the generated folder from time to time. Sometimes the MATLAB with cache some of the files needed for code generation - and that might explain why it did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 08:14:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752423#M1819</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2017-12-04T08:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: PIT Timer Problem</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752424#M1820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel. Very strange indeed, but I'll be sure to manually delete the generated folders every so often.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 23:52:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PIT-Timer-Problem/m-p/752424#M1820</guid>
      <dc:creator>jjacp</dc:creator>
      <dc:date>2017-12-05T23:52:02Z</dc:date>
    </item>
  </channel>
</rss>

