<?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: Output Override and Fault Protection for MPC574xP (Model Based Tools) in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Output-Override-and-Fault-Protection-for-MPC574xP-Model-Based/m-p/786903#M2258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/abhishek.kumar@chassisbrakes.com"&gt;abhishek.kumar@chassisbrakes.com&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the MBDT Blocks for MPC574xP does not currently support the hardware FlexPWM Fault Mechanism&amp;nbsp;configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the fault mechanism can be enabled by injecting custom code in the model by using Simulink Custom Code blocks. Those blocks can be found in the&amp;nbsp;Simulink Coder (see the image attached), from the Simulink library.&amp;nbsp;The System Initialize block will inject the code in the generated initialize function and the System Outputs blocks will put your code in the step function.&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/69097i8470B766171315B6/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;Now, for enabling the fault mechanism, you need to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;set the fault states for each output pins, (see regs FlexPWM_SUBn_OCTRL, bits&amp;nbsp;PWMAFS and&amp;nbsp;PWMBFS)&lt;/LI&gt;&lt;LI&gt;enable the fault pin number that will stop the pwm generation on each submodule (see regs FlexPWM_SUBn_DISMAP)&lt;/LI&gt;&lt;LI&gt;set the Fault Control Register for pin level and auto clearing (see reg FlexPWM_FCTRL)&lt;/LI&gt;&lt;LI&gt;enable the pin needed to be used as PWM fault input.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To have an idea on how the bits are set by the MBDT, the&amp;nbsp;FlexPWM_pnt_library.c file can be analysed in any generated code folder of a model that uses the PWM blocks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2018 18:43:21 GMT</pubDate>
    <dc:creator>mariuslucianand</dc:creator>
    <dc:date>2018-12-11T18:43:21Z</dc:date>
    <item>
      <title>Output Override and Fault Protection for MPC574xP (Model Based Tools)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Output-Override-and-Fault-Protection-for-MPC574xP-Model-Based/m-p/786902#M2257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement Output Override and Fault protection as shown below in the Diagram (Red Rectangle).&lt;/P&gt;&lt;P&gt;I want to have my PWM being disabled without any Software logic if I receive a fault from Motor Driver IC. How can I configure the PWM blocks for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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/67634iAED1BE866A7D2050/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 14:47:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Output-Override-and-Fault-Protection-for-MPC574xP-Model-Based/m-p/786902#M2257</guid>
      <dc:creator>abhishek_kumar1</dc:creator>
      <dc:date>2018-12-11T14:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Output Override and Fault Protection for MPC574xP (Model Based Tools)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Output-Override-and-Fault-Protection-for-MPC574xP-Model-Based/m-p/786903#M2258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/abhishek.kumar@chassisbrakes.com"&gt;abhishek.kumar@chassisbrakes.com&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the MBDT Blocks for MPC574xP does not currently support the hardware FlexPWM Fault Mechanism&amp;nbsp;configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the fault mechanism can be enabled by injecting custom code in the model by using Simulink Custom Code blocks. Those blocks can be found in the&amp;nbsp;Simulink Coder (see the image attached), from the Simulink library.&amp;nbsp;The System Initialize block will inject the code in the generated initialize function and the System Outputs blocks will put your code in the step function.&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/69097i8470B766171315B6/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;Now, for enabling the fault mechanism, you need to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;set the fault states for each output pins, (see regs FlexPWM_SUBn_OCTRL, bits&amp;nbsp;PWMAFS and&amp;nbsp;PWMBFS)&lt;/LI&gt;&lt;LI&gt;enable the fault pin number that will stop the pwm generation on each submodule (see regs FlexPWM_SUBn_DISMAP)&lt;/LI&gt;&lt;LI&gt;set the Fault Control Register for pin level and auto clearing (see reg FlexPWM_FCTRL)&lt;/LI&gt;&lt;LI&gt;enable the pin needed to be used as PWM fault input.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To have an idea on how the bits are set by the MBDT, the&amp;nbsp;FlexPWM_pnt_library.c file can be analysed in any generated code folder of a model that uses the PWM blocks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 18:43:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Output-Override-and-Fault-Protection-for-MPC574xP-Model-Based/m-p/786903#M2258</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2018-12-11T18:43:21Z</dc:date>
    </item>
  </channel>
</rss>

