<?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>MPC5xxxのトピックRe: MPC5643L FlexPWM DISMAP question</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623494#M5535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please specify which example do you refer to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see no reason for switching on FlexPWM channels before configuring DISMAP.&lt;/P&gt;&lt;P&gt;Also as you wrote, if &lt;SPAN style="background: #F6F6F6;"&gt;FAULT_PROTECT_PWMA_ON&lt;/SPAN&gt; actually clears DISA in DISMAP, then the comment is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Dec 2016 10:25:12 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2016-12-20T10:25:12Z</dc:date>
    <item>
      <title>MPC5643L FlexPWM DISMAP question</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623493#M5534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I just recently got my hands on the demo kit and started reading through the example code. There are&amp;nbsp;two questions for&amp;nbsp;the following section of code.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// Switch on all FlexPWM channels&lt;BR /&gt; SWITCH_ALL_PWM_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Enable FlexPWMA/FlexPWMB fault protection&lt;BR /&gt; FAULT_PROTECT_PWMA_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;BR /&gt; FAULT_PROTECT_PWMB_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Switch off all FlexPWM channels&lt;BR /&gt; SWITCH_ALL_PWM_OFF(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;First, is it required to switch on FlexPWM channels first before configuring DISMAP? It's not mentioned in the MPC5643L reference manual in nowhere. If so, why?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, the subfunction of&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;FAULT_PROTECT_PWMA_ON&lt;/SPAN&gt; actually clears DISA in DISMAP. However, if DISA is zero, the fault protection is disabled as seen in figure 25-27 and following quote.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN class=""&gt;The PWMA output will be turned off if there is a logic 1 on a FAULTx input and a 1 in the corresponding&lt;BR /&gt;bit of the DISA field.&amp;nbsp;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But the comment of the code indicates it is for enabling fault protection?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Dec 2016 00:53:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623493#M5534</guid>
      <dc:creator>zili</dc:creator>
      <dc:date>2016-12-18T00:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5643L FlexPWM DISMAP question</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623494#M5535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please specify which example do you refer to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see no reason for switching on FlexPWM channels before configuring DISMAP.&lt;/P&gt;&lt;P&gt;Also as you wrote, if &lt;SPAN style="background: #F6F6F6;"&gt;FAULT_PROTECT_PWMA_ON&lt;/SPAN&gt; actually clears DISA in DISMAP, then the comment is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 10:25:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623494#M5535</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-12-20T10:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5643L FlexPWM DISMAP question</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623495#M5536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example is&amp;nbsp;MTRCKTDPS5643L, which comes with the demo kit of 'AN4518 Dual 3-Phase PMSM Development Kit with MPC5643L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 10:54:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623495#M5536</guid>
      <dc:creator>zili</dc:creator>
      <dc:date>2016-12-20T10:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5643L FlexPWM DISMAP question</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623496#M5537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the following code in the main loop, sections related to DISMAP are highlighted.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void main (void)&lt;BR /&gt;{&lt;BR /&gt; DISABLE_IRQ();&lt;BR /&gt; // Initializing of clock, reset, core mode etc.&lt;BR /&gt; sys_init();&lt;/P&gt;&lt;P&gt;// Initializing wait states in for FLASH read/write&lt;BR /&gt; //flash_init_fnc();&lt;/P&gt;&lt;P&gt;// Initialize UART&lt;BR /&gt; uart_init();&lt;/P&gt;&lt;P&gt;// FreeMASTER initialization&lt;BR /&gt; FMSTR_Init();&lt;/P&gt;&lt;P&gt;// Siu initialize&lt;BR /&gt; siul_init();&lt;/P&gt;&lt;P&gt;// Initialize DSPI module&lt;BR /&gt; dspi_init();&lt;/P&gt;&lt;P&gt;// Initialize PIT timer module&lt;BR /&gt; pit_init();&lt;/P&gt;&lt;P&gt;// Initialize SBC power source&lt;BR /&gt; mc33905Config(&amp;amp;sbcDrv);&lt;/P&gt;&lt;P&gt;// Initialize FlexPWM module&lt;BR /&gt; flexpwm0_init();&lt;BR /&gt; flexpwm1_init();&lt;/P&gt;&lt;P&gt;// Initialize CTU module&lt;BR /&gt; ctu_init();&lt;/P&gt;&lt;P&gt;// Initialize eTimer0, eTimer1, eTimer2 module&lt;BR /&gt; etimer0_init();&lt;BR /&gt; etimer1_init();&lt;/P&gt;&lt;P&gt;// Initialize ADC_0 module with HW offset cancellation&lt;BR /&gt; adc0_init();&lt;BR /&gt; adc_off_canc(&amp;amp;ADC_0);&lt;/P&gt;&lt;P&gt;// Initialize ADC_1 module with HW offset cancellation&lt;BR /&gt; adc1_init();&lt;BR /&gt; adc_off_canc(&amp;amp;ADC_1);&lt;/P&gt;&lt;P&gt;// MC33937 Configuration with Double RESET Timing logic&lt;BR /&gt; // Since the reset pin is common for both power stages, the configuration&lt;BR /&gt; // is done automatically for both PWSTGs in one step !!!&lt;BR /&gt; mc33937DoubleReset(&amp;amp;(M1.preDrv));&lt;BR /&gt; &lt;BR /&gt; #ifdef UNI3_1&lt;BR /&gt; // Initialize MC33937 driver on 3ph Low voltage power-stage&lt;BR /&gt; mc33937Config(&amp;amp;(M1.preDrv));&lt;BR /&gt; mc33937Enable(&amp;amp;(M1.preDrv));&lt;BR /&gt; mc33937ReadSr(&amp;amp;(M1.preDrv));&lt;BR /&gt; if (M1.preDrv.status.sr0.R!=0) M1.faultID.B.WrongHardware = 1;&lt;/P&gt;&lt;P&gt;M1.cntrState.state = init;&lt;BR /&gt; M1.cntrState.event = e_init;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Switch on all FlexPWM channels&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; SWITCH_ALL_PWM_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Enable FlexPWMA/FlexPWMB fault protection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; FAULT_PROTECT_PWMA_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; FAULT_PROTECT_PWMB_ON(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Switch off all FlexPWM channels&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; SWITCH_ALL_PWM_OFF(M1.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;#ifdef UNI3_2&lt;BR /&gt; // Initialize MC33937 driver on 3ph Low voltage power-stage&lt;BR /&gt; mc33937Config(&amp;amp;(M2.preDrv));&lt;BR /&gt; mc33937Enable(&amp;amp;(M2.preDrv));&lt;BR /&gt; mc33937ReadSr(&amp;amp;(M2.preDrv));&lt;BR /&gt; if (M2.preDrv.status.sr0.R!=0) M2.faultID.B.WrongHardware = 1;&lt;/P&gt;&lt;P&gt;M2.cntrState.state = init;&lt;BR /&gt; M2.cntrState.event = e_init;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Switch on all FlexPWM channels&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; SWITCH_ALL_PWM_ON(M2.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Enable FlexPWMA/FlexPWMB fault protection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; FAULT_PROTECT_PWMA_ON(M2.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; FAULT_PROTECT_PWMB_ON(M2.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;// Switch off all FlexPWM channels&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; SWITCH_ALL_PWM_OFF(M2.uni3PeriphCfg.flexPwmBaseAddr);&lt;/SPAN&gt;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;// CTU MRS_O clearing&lt;BR /&gt; if(pCTU-&amp;gt;CTUEFR.B.MRS_O) pCTU-&amp;gt;CTUEFR.B.MRS_O = 1; &lt;BR /&gt; &lt;BR /&gt; // Enable all interrupts&lt;BR /&gt; // Ensure INTC's current priority is 0&lt;BR /&gt; INTC.CPR_PRC0.B.PRI = 0;&lt;BR /&gt; // Enable external interrupts&lt;BR /&gt; ENABLE_IRQ();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt; {&lt;BR /&gt; // Reading faults from MC33937 pre-driver - the same pin for both Power Stages&lt;BR /&gt; if (GET_SIUL_INPUT_VAL(SIUL_PAD_53))&lt;BR /&gt; {&lt;BR /&gt; #ifdef UNI3_1&lt;BR /&gt; if (M1.cntrState.readFault)&lt;BR /&gt; {&lt;BR /&gt; mc33937ReadSr(&amp;amp;M1.preDrv);&lt;BR /&gt; if (M1.preDrv.status.sr0.R!=0) M1.faultID.B.WrongHardware = 1;&lt;BR /&gt; M1.cntrState.readFault = false;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;#ifdef UNI3_2&lt;BR /&gt; if (M2.cntrState.readFault)&lt;BR /&gt; {&lt;BR /&gt; mc33937ReadSr(&amp;amp;M2.preDrv);&lt;BR /&gt; if (M2.preDrv.status.sr0.R!=0) M2.faultID.B.WrongHardware = 1;&lt;BR /&gt; M2.cntrState.readFault = false;&lt;BR /&gt; }&lt;BR /&gt; #endif&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// FreeMaster polling function, shall be executed on background&lt;BR /&gt; FMSTR_Poll();&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 17:01:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5643L-FlexPWM-DISMAP-question/m-p/623496#M5537</guid>
      <dc:creator>zili</dc:creator>
      <dc:date>2016-12-20T17:01:21Z</dc:date>
    </item>
  </channel>
</rss>

