<?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 S32K144 FTM OC function doubts in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798310#M2689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using FTM OC function, but when I use SDK to configure my OC channel, I got some doubts.&lt;/P&gt;&lt;P&gt;1. Clock source frequency after prescaler is 1MHz.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69781iA1D92FDB2625C22C/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Max counter value set to 150. Means I need to set the output pin curve period for 150us.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69810iF24C10ED38F1FC17/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. Channel compared value set to 100. Means I want to toggle output pin when at 100us.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69791iF52644FF91B63547/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;RESULT: I got following curve.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69995iE4241F6303382C04/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.jpg" alt="4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both high level and low level duration are 150us.&lt;/P&gt;&lt;P&gt;MY QUESTION: What's the meaning of compared value which set for channel? How to use it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2018 02:03:34 GMT</pubDate>
    <dc:creator>xiaoyuwang</dc:creator>
    <dc:date>2018-12-14T02:03:34Z</dc:date>
    <item>
      <title>S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798310#M2689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using FTM OC function, but when I use SDK to configure my OC channel, I got some doubts.&lt;/P&gt;&lt;P&gt;1. Clock source frequency after prescaler is 1MHz.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69781iA1D92FDB2625C22C/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Max counter value set to 150. Means I need to set the output pin curve period for 150us.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69810iF24C10ED38F1FC17/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. Channel compared value set to 100. Means I want to toggle output pin when at 100us.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69791iF52644FF91B63547/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;RESULT: I got following curve.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69995iE4241F6303382C04/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.jpg" alt="4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both high level and low level duration are 150us.&lt;/P&gt;&lt;P&gt;MY QUESTION: What's the meaning of compared value which set for channel? How to use it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2018 02:03:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798310#M2689</guid>
      <dc:creator>xiaoyuwang</dc:creator>
      <dc:date>2018-12-14T02:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798311#M2690</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;Compared value is the moment when the output action occurs. In our case the signal is toggled. So, your assumptions are right.&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/70607iA03AA7D14DA4D095/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;Compared value can be used to generate phase shifted signals, generate event after some period of time and so on.&lt;/P&gt;&lt;P&gt;I can provide you more details if you can detail your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:12:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798311#M2690</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-12-14T15:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798312#M2691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Tilimpea,&lt;/P&gt;&lt;P&gt;I have solve problem yesterday. But now I met another fault.&lt;/P&gt;&lt;P&gt;I call following function to set the action when match to "FTM_SET_ON_MATCH" mode in my 50ms task.&lt;/P&gt;&lt;P&gt;FTM_DRV_SetOutputlevel(FRT_SNSR1_MOD, FRT_SNSR1_CHN, (uint8_t)FTM_SET_ON_MATCH);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2018 11:23:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798312#M2691</guid>
      <dc:creator>xiaoyuwang</dc:creator>
      <dc:date>2018-12-15T11:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798313#M2692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Tilimpea,&lt;/P&gt;&lt;P&gt;sorry for the error reply. I have solve problem yesterday. But I met a new fault today.&lt;/P&gt;&lt;P&gt;Step 1: I want to get a 150us pulse and I set FTM0 module clock 250KHz, 4us every tick.&lt;/P&gt;&lt;P&gt;Step 2: I called function "FTM_DRV_SetOutputlevel" in my task to control to start channel and set match mode to "FTM_SET_ON_MATCH".&lt;/P&gt;&lt;P&gt;Step 3: Set match value to 38 and set relative value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70103iE25B7658D92EE98C/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Means I will stop channel once channel interrupt is got. And waiting for next task schedulation.&lt;/P&gt;&lt;P&gt;Step 4: Run my task for 50ms&amp;nbsp; period.&lt;/P&gt;&lt;P&gt;ISSUE 1: The pulse period is 50ms, it is correct. But pulse width is changed from 50+ to 152us every task period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2018 12:35:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798313#M2692</guid>
      <dc:creator>xiaoyuwang</dc:creator>
      <dc:date>2018-12-15T12:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798314#M2693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONTINUE&lt;/P&gt;&lt;P&gt;ISSUE 2:&amp;nbsp; Function call for "FTMDRV_SetOutputState" cannot change channel output level.&lt;/P&gt;&lt;P&gt;QUESTION: If I want to get low level pulse, how to invert the curve phase?&lt;/P&gt;&lt;P&gt;Thank you so much for your answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2018 12:38:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798314#M2693</guid>
      <dc:creator>xiaoyuwang</dc:creator>
      <dc:date>2018-12-15T12:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798315#M2694</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;Based on the details provided by you I suppose that the pulse width is not always the same due to software overhead or because other taks/interrupts are handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain what signal are you trying to generate? In this way I can try to provide an better alternative to implement your software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2018 17:42:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798315#M2694</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-12-15T17:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798316#M2695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Tilimpea,&lt;/P&gt;&lt;P&gt;My application is use OC module to generate a pulse to drive ultrasonic sensor to measure the distance of a object and use IC module to get echo.&amp;nbsp; If you have better solution, could you provide.&lt;/P&gt;&lt;P&gt;In my system, I really use many interrupts, e.g. UART, CAN, LPIT, LPTMR. So I think my error is actually affected by other interrupts.&amp;nbsp; Do you have any suggestion for these interrupts priority?&lt;/P&gt;&lt;P&gt;Thank you~~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Dec 2018 04:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798316#M2695</guid>
      <dc:creator>xiaoyuwang</dc:creator>
      <dc:date>2018-12-16T04:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798317#M2696</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;You can try to increase the priority of FTM, but this won't solve the case when other interrupt handler is executed when FTM interrupt is requested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If is mandatory to generate the exact pulse width you have to use ftm_pwm because the pulse is generated by hardware, without software intervention. Do you have some limitation to not use ftm_pwm driver?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Dec 2018 15:32:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/798317#M2696</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-12-16T15:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/1270019#M10728</link>
      <description>&lt;P&gt;i meet the question,how you slove this prolem。&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 02:55:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/1270019#M10728</guid>
      <dc:creator>julywu</dc:creator>
      <dc:date>2021-04-29T02:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 FTM OC function doubts</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/1270637#M10737</link>
      <description>&lt;P&gt;i know why now.because i did not update the cnv value.if i set the cnv 100,set the MOD 150,the first match happen with the channel output flip,when CNT count to 100,spend 100 count time.the second match&amp;nbsp;happen with the channel output flip,when CNT count to 100,spend 150 count time(50+100).&lt;/P&gt;&lt;P&gt;so the waveform will behave like 150 count time.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 04:25:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-FTM-OC-function-doubts/m-p/1270637#M10737</guid>
      <dc:creator>julywu</dc:creator>
      <dc:date>2021-04-30T04:25:58Z</dc:date>
    </item>
  </channel>
</rss>

