<?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>S32 Design Studio中的主题 PWM Synchronization</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/PWM-Synchronization/m-p/1046023#M6175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using S32144 48lqfp mcu on my mode and&amp;nbsp; used pwm synchronization in hardware trigger mode, and i'm using two hardware trigger 0 and&amp;nbsp;&lt;SPAN&gt;hardware trigger 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;as outmask and swoctrl is updating in main code as well as in for loop but not updating input capture mode call back??.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Below i attached my code .&lt;/P&gt;&lt;P&gt;ic call back :&lt;/P&gt;&lt;P&gt;void HallSensorDetection()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;FTM1-&amp;gt;CNT = 0;&lt;BR /&gt;ACTUATE_SetPwmMask(0X34, 0X0808, HW_INPUT_TRIG0);&lt;BR /&gt; PINS_DRV_TogglePins(PTB,(uint32_t) (1 &amp;lt;&amp;lt; 5));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tBool ACTUATE_SetPwmMask(uint8_t ui8OutMask, uint16_t ui16SwCtrl, tBool ftmInputTrig)&lt;BR /&gt;{&lt;BR /&gt; /* Clear FTM3SYNCBIT to prepare HW trigger for FTM3 */&lt;BR /&gt; SIM-&amp;gt;FTMOPT1 &amp;amp;= ~(SIM_FTMOPT1_FTM3SYNCBIT_MASK &amp;amp; (ftmInputTrig &amp;lt;&amp;lt; SIM_FTMOPT1_FTM3SYNCBIT_SHIFT));&lt;/P&gt;&lt;P&gt;// Apply Mask&lt;BR /&gt; //FTM3-&amp;gt;OUTMASK = ui8OutMask;&lt;BR /&gt; FTM_DRV_MaskOutputChannels(INST_FLEXTIMER_PWM3, ui8OutMask, false);&lt;BR /&gt; FTM3-&amp;gt;SWOCTRL = ui16SwCtrl;&lt;/P&gt;&lt;P&gt;/* Set FTM3SYNCBIT to trigger and update FTM3 registers */&lt;BR /&gt; SIM-&amp;gt;FTMOPT1 |= (SIM_FTMOPT1_FTM3SYNCBIT_MASK &amp;amp; (ftmInputTrig &amp;lt;&amp;lt; SIM_FTMOPT1_FTM3SYNCBIT_SHIFT));&lt;/P&gt;&lt;P&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2020 13:30:17 GMT</pubDate>
    <dc:creator>aash92</dc:creator>
    <dc:date>2020-04-01T13:30:17Z</dc:date>
    <item>
      <title>PWM Synchronization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/PWM-Synchronization/m-p/1046023#M6175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using S32144 48lqfp mcu on my mode and&amp;nbsp; used pwm synchronization in hardware trigger mode, and i'm using two hardware trigger 0 and&amp;nbsp;&lt;SPAN&gt;hardware trigger 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;as outmask and swoctrl is updating in main code as well as in for loop but not updating input capture mode call back??.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Below i attached my code .&lt;/P&gt;&lt;P&gt;ic call back :&lt;/P&gt;&lt;P&gt;void HallSensorDetection()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;FTM1-&amp;gt;CNT = 0;&lt;BR /&gt;ACTUATE_SetPwmMask(0X34, 0X0808, HW_INPUT_TRIG0);&lt;BR /&gt; PINS_DRV_TogglePins(PTB,(uint32_t) (1 &amp;lt;&amp;lt; 5));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tBool ACTUATE_SetPwmMask(uint8_t ui8OutMask, uint16_t ui16SwCtrl, tBool ftmInputTrig)&lt;BR /&gt;{&lt;BR /&gt; /* Clear FTM3SYNCBIT to prepare HW trigger for FTM3 */&lt;BR /&gt; SIM-&amp;gt;FTMOPT1 &amp;amp;= ~(SIM_FTMOPT1_FTM3SYNCBIT_MASK &amp;amp; (ftmInputTrig &amp;lt;&amp;lt; SIM_FTMOPT1_FTM3SYNCBIT_SHIFT));&lt;/P&gt;&lt;P&gt;// Apply Mask&lt;BR /&gt; //FTM3-&amp;gt;OUTMASK = ui8OutMask;&lt;BR /&gt; FTM_DRV_MaskOutputChannels(INST_FLEXTIMER_PWM3, ui8OutMask, false);&lt;BR /&gt; FTM3-&amp;gt;SWOCTRL = ui16SwCtrl;&lt;/P&gt;&lt;P&gt;/* Set FTM3SYNCBIT to trigger and update FTM3 registers */&lt;BR /&gt; SIM-&amp;gt;FTMOPT1 |= (SIM_FTMOPT1_FTM3SYNCBIT_MASK &amp;amp; (ftmInputTrig &amp;lt;&amp;lt; SIM_FTMOPT1_FTM3SYNCBIT_SHIFT));&lt;/P&gt;&lt;P&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 13:30:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/PWM-Synchronization/m-p/1046023#M6175</guid>
      <dc:creator>aash92</dc:creator>
      <dc:date>2020-04-01T13:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Synchronization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/PWM-Synchronization/m-p/1046024#M6176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/aash92" rel="nofollow noopener noreferrer" target="_blank"&gt;aash92&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Could you halt the application at this line:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;SIM-&amp;gt;FTMOPT1 |= (SIM_FTMOPT1_FTM3SYNCBIT_MASK &amp;amp; (ftmInputTrig &amp;lt;&amp;lt; SIM_FTMOPT1_FTM3SYNCBIT_SHIFT));&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And read the FTM3_SYNC[TRIG1] bit with the debugger to see if the trigger is enabled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2020 09:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/PWM-Synchronization/m-p/1046024#M6176</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-04-06T09:48:20Z</dc:date>
    </item>
  </channel>
</rss>

