<?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>S32KのトピックRe: How to Count 'FTM Cycle '</title>
    <link>https://community.nxp.com/t5/S32K/How-to-Count-FTM-Cycle/m-p/810440#M2934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;the "FTM peripheral timer overflow interrupt" is triggered when the FTM counter = MOD and overflows and the "FTM peripheral timer channel interrupt" is triggered when FTM counter = CnV.&lt;BR /&gt;It is described in Section 45.5.7, RM r.7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest solution would be to use one of the two interrupts and count the PWM cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can generate FTM output trigger on a FTM channel match (FTM counter = CnV) (CnSC[TRIGMODE = 1]) and route the FTM output trigger to LPIT module using TRGMUX module.&lt;BR /&gt;The LPIT module can be used in 32-bit Trigger Accumulator which counts input triggers. Again, on the LPIT overflow after 100 counts, an interrupt can be generated.&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>Tue, 26 Jun 2018 11:40:07 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2018-06-26T11:40:07Z</dc:date>
    <item>
      <title>How to Count 'FTM Cycle '</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Count-FTM-Cycle/m-p/810439#M2933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I would like to count FTM cycle.&lt;/P&gt;&lt;P&gt;I use s32k144 and s32k144EVB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set FTM0 to make Edge PWM.&lt;/P&gt;&lt;P&gt;it's source Clock is 8Mhz and prescaler is 2. so it is going to be 4MHz.&lt;/P&gt;&lt;P&gt;Set MOD to 36 and CnV is 18.&lt;/P&gt;&lt;P&gt;They were set to make PWM pulse 110Khz 50% duty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, I want count pwm cycle number.&lt;/P&gt;&lt;P&gt;I want it make pwm pulse with certain frequency until 100 cycle&lt;/P&gt;&lt;P&gt;and make pwm pulse with other frequency until 50cycle.&lt;/P&gt;&lt;P&gt;I think I can change frequencies. but don't know how to count pwm cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Can you recommend the way to count pwm cycles under those condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What are the "FTM peripheral timer overflow interrupt" and "FTM peripheral timer channel interrupt" ? what is difference between them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 11:30:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Count-FTM-Cycle/m-p/810439#M2933</guid>
      <dc:creator>daemangpark</dc:creator>
      <dc:date>2018-06-22T11:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count 'FTM Cycle '</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Count-FTM-Cycle/m-p/810440#M2934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;the "FTM peripheral timer overflow interrupt" is triggered when the FTM counter = MOD and overflows and the "FTM peripheral timer channel interrupt" is triggered when FTM counter = CnV.&lt;BR /&gt;It is described in Section 45.5.7, RM r.7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest solution would be to use one of the two interrupts and count the PWM cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can generate FTM output trigger on a FTM channel match (FTM counter = CnV) (CnSC[TRIGMODE = 1]) and route the FTM output trigger to LPIT module using TRGMUX module.&lt;BR /&gt;The LPIT module can be used in 32-bit Trigger Accumulator which counts input triggers. Again, on the LPIT overflow after 100 counts, an interrupt can be generated.&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>Tue, 26 Jun 2018 11:40:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Count-FTM-Cycle/m-p/810440#M2934</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-06-26T11:40:07Z</dc:date>
    </item>
  </channel>
</rss>

