<?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: S32K144 - FTM Output Compare for Single Pulse in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844004#M3433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;Unlike the MODE_INIT function, OUTMASK can mask all the PWM channels independently. &lt;BR /&gt;Any write to the OUTMASK register stores the value in its write buffer and then&amp;nbsp;it needs to be synchronized.&lt;BR /&gt;45.5.13.7 OUTMASK register synchronization, S32K1xx RM, rev.9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://www.nxp.com/docs/en/application-note/AN5303.pdf"&gt;AN5303 Features and Operation Modes of FlexTimer Module on S32K&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;4.1. Masking, inverting, and software-controlling features.&lt;BR /&gt;4.3. Updating FTM registers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple example that shows PWM duty-cycle synchronization, SW trigger, can be found here:&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/482643"&gt;FTM S32k144 indepentent PWM channel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jan 2019 11:24:56 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2019-01-07T11:24:56Z</dc:date>
    <item>
      <title>S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844001#M3430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question regarding the generation of a single pulse (one shot) using the Flex Timer Output Compare method. I wish to generate an immediate pulse (positive edge) which last a given duration and returns back low - a simple single shot or one shot operation. I want the pulse to begin immediately by forcing the output to a high state and letting an OC match reset the pulse. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the output compare function I realize that I can set up a OC match to set the pulse high and then another OC match to reset the pulse to low. But what I wish to do is manually set the output high and then let a single OC match set the pulse back low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a proper S/W means to force the output high manually while the FTM is configured in OC mode? I see that there are registers like OUTINIT but this appears to be an initialization register and not a runtime. And I see the register SWOCTRL which appears to be the correct method, however from the manual this appears to be used for PWM synchronization and not OC mode? And there are different SYNCONF update mechanisms for SWOCTRL, again not appearing to be relevant to the OC mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be the simplest operation to generate a one-shop pulse but the actual implementation is not clear.... without having to resort to multiple OC operations or even bit-banging GPIO during OC matches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2018 18:11:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844001#M3430</guid>
      <dc:creator>brucebowling</dc:creator>
      <dc:date>2018-12-31T18:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844002#M3431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;Output Compare can only clear, set or toggle the output pin on match but the initial state is not defined.&lt;/P&gt;&lt;P&gt;Have you consider using PWM instead? It can be disabled or masked on this first match.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;OUTINIT can be used to set the initial state of the OC output though.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The output&amp;nbsp;can be driven HIGH by a write to MODE_INIT just before the OC starts and the output&amp;nbsp;can be&amp;nbsp;cleared on the match.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 19:42:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844002#M3431</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-01-03T19:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844003#M3432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. The PWM mode may work, however is this independent of all channels? The 8 channels are all doing the same operation but they are phase-shifted so the OC operations do not overlap. Does the mask affect all 8 channels? Is there example code showing this mode of operation using PWM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On using the MODE_INIT, it appears that this will affect all 8 channels at the same time - they will all get re-initialized and the channels are independent. Or is there a way to have this happen to just one channel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 20:03:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844003#M3432</guid>
      <dc:creator>brucebowling</dc:creator>
      <dc:date>2019-01-03T20:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844004#M3433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;Unlike the MODE_INIT function, OUTMASK can mask all the PWM channels independently. &lt;BR /&gt;Any write to the OUTMASK register stores the value in its write buffer and then&amp;nbsp;it needs to be synchronized.&lt;BR /&gt;45.5.13.7 OUTMASK register synchronization, S32K1xx RM, rev.9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://www.nxp.com/docs/en/application-note/AN5303.pdf"&gt;AN5303 Features and Operation Modes of FlexTimer Module on S32K&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;4.1. Masking, inverting, and software-controlling features.&lt;BR /&gt;4.3. Updating FTM registers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple example that shows PWM duty-cycle synchronization, SW trigger, can be found here:&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/482643"&gt;FTM S32k144 indepentent PWM channel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 11:24:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844004#M3433</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-01-07T11:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844005#M3434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel - thank you for the response and feedback. I have one question of OUTMASK - in the reference manual table 45.4.3.12,4 which is the description of bits for the OUTMASK, it says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="left: 213.75px; top: 245.66px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02539);"&gt;Defines if the channel output is masked or unmasked.&lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 263.993px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.035);"&gt;0b - Channel output is not masked. It continues to operate normally.&lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt;1b - Channel output is masked. It is forced to its inactive state.&lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt; &lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt;So if I read this, it implies that if I mask a channel that it "is forced to its inactive state". Does this mean that it then follows the corresponding bit value in OUTINIT? And if you do set a channel to its "inactive state" using OUTMASK, if you then issue another OUTMASK register update, this time with the bit cleared does the output stay at this state? In other words, when you issue a OUTINIT with OUTMASK masking all of the other 7 channels, does subsequent OUTMASK operations on other channels reset the first one, or is the state latched when you issue the OUTINIT/OUTMASK?&lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt; &lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt;In my application I need to have all 8 channels run this one-shot mode, and they are all phased independently and have different widths so one channel may be in the middle of a pulse while another channel is just initiating a pulse. I do not the act of setting up one channel to stomp over other channels. The combination of OUTINIT and OUTMASK seem like this could be what I need, but need to verify that they work orthogonally between channels.&lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt; &lt;/DIV&gt;&lt;DIV style="left: 253.755px; top: 282.327px; font-size: 15px; font-family: sans-serif; transform: scaleX(1.02916);"&gt;- Bruce&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 14:42:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844005#M3434</guid>
      <dc:creator>brucebowling</dc:creator>
      <dc:date>2019-01-07T14:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844006#M3435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bruce,&lt;/P&gt;&lt;P&gt;Please see the simple project attached.&amp;nbsp; It implements a one-shot function on all 8 channels of FTM0.&amp;nbsp; In addition to the output compare, this function utilizes the OUTINIT to set the initial pin state and the OUTMASK to prevent action on other channels.&amp;nbsp; An inactive channel is disabled with the OUTMASK.&amp;nbsp; When a one-shot is desired, the one-shot function will set the pin high with OUTINIT, set up the output compare with interrupt enabled and enable the desired pin with OUTMASK.&amp;nbsp; When the OC occurs an interrupt is triggered to clear the flag, disable the interrupt and disable the pin with OUTMASK.&amp;nbsp; I hope this helps but there may be some race conditions that need to be taken into account.&amp;nbsp; I did test various overlapping conditions and it looks good.&lt;/P&gt;&lt;P&gt;-Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 12:52:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844006#M3435</guid>
      <dc:creator>peter_pinewski</dc:creator>
      <dc:date>2019-01-08T12:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844007#M3436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: windowtext;"&gt;In thinking about this some more, it may be better to simply keep the pin high through the FTM and create the pulse only with OUTMASK.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2f5597;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #4472c4; margin-left: 0in;"&gt;&lt;SPAN style="color: windowtext;"&gt;Set the pin high in the One-Shot function by clearing OUTMASK bit of desired channel&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: #4472c4; margin-left: 0in;"&gt;&lt;SPAN style="color: windowtext;"&gt;Drive pin low from OC interrupt by setting OUTMASK bit (making sure the inactive state is low)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #2f5597;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: windowtext;"&gt;This would have the least affect on other channels and would prevent race conditions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: windowtext;"&gt;The only thing is that we would need to elevate the OC interrupt service routines (which are very quick) to a very high priority.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 12:58:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844007#M3436</guid>
      <dc:creator>peter_pinewski</dc:creator>
      <dc:date>2019-01-08T12:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 - FTM Output Compare for Single Pulse</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844008#M3437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter and Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the extra time and support on this simple question, the solutions the both of you provided should be more than enough to get this operational. Mark this one as solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:44:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844008#M3437</guid>
      <dc:creator>brucebowling</dc:creator>
      <dc:date>2019-01-08T16:44:23Z</dc:date>
    </item>
  </channel>
</rss>

