<?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: KV10Z32 FTM doesn't work in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346587#M16888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhi Qu,&lt;/P&gt;&lt;P&gt;I'd like to highly recommend that you get to download the sample code package of the TWR-KV10Z32 board.&lt;/P&gt;&lt;P&gt;And it also contains the demos about the FTM module and I think it will help you to fix this issue, so you can refer to for details.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip" title="http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip"&gt;http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 06:25:40 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2015-01-27T06:25:40Z</dc:date>
    <item>
      <title>KV10Z32 FTM doesn't work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346584#M16885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm trying work with Keil uVision 5 on the KV10Z32 board. However, the FTM won't work properly and performs really weird.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;With the following code, I'm trying to configure TPM0 Ch0 to output a PWM signal on PTE24 and generate interrupt every switching period. However, the FTM would start working and count to some arbitrary value and stop working. I also found that when I enabled ADC and constantly sample with the ADC will enable the FTM counter to work. Besides, even when the FTM0 is counting, I can't even reset the overflow bit in FTM0-&amp;gt;SC because that would lead to hard fault handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I've attached the code. Calling the Init_PWM() in main function doesn't start the FTM counter while calling Init_PWM(), Init_ADC() and then starting ADC with ADC0-&amp;gt;SC1[0] = 0x49 will enable the FTM counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm desperate for help with this as I've got stuck on this for whole week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;void Init_PWM(void)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; SIM-&amp;gt;SCGC6 |= SIM_SCGC6_FTM0_MASK;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; SIM-&amp;gt;SCGC5 |= (SIM_SCGC5_PORTA_MASK&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | SIM_SCGC5_PORTB_MASK&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | SIM_SCGC5_PORTC_MASK&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | SIM_SCGC5_PORTD_MASK&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | SIM_SCGC5_PORTE_MASK );&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; PORTE-&amp;gt;PCR[24] = PORT_PCR_MUX(3);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FTM0-&amp;gt;MOD=0xffff;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FTM0-&amp;gt;CONTROLS[0].CnV&amp;nbsp; = 100;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FTM0-&amp;gt;SC |= FTM_SC_PS(0) | FTM_SC_CLKS(1) | FTM_SC_TOIE_MASK;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FTM0-&amp;gt;CONTROLS[0].CnSC = FTM_CnSC_MSB_MASK | FTM_CnSC_ELSB_MASK;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; NVIC_EnableIRQ(FTM0_IRQn);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;void Init_ADC(void)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; SIM-&amp;gt;SCGC6 |= (1UL &amp;lt;&amp;lt; SIM_SCGC6_ADC0_SHIFT);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ADC0-&amp;gt;CFG1 = 0x8C; // Select 16 bit resolution&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ADC0-&amp;gt;SC2 = 0;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; NVIC_EnableIRQ (ADC0_IRQn);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;void FTM0_IRQHandler(){&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; NVIC_ClearPendingIRQ(FTM0_IRQn);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FTM0-&amp;gt;SC &amp;amp;= ~FTM_SC_TOF_MASK;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;void ADC0_IRQHandler()&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; int q;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; NVIC_ClearPendingIRQ(ADC0_IRQn);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; q=ADC0-&amp;gt;R[0];&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ADC0-&amp;gt;SC1[0] = 0x49;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 14:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346584#M16885</guid>
      <dc:creator>zhiqu</dc:creator>
      <dc:date>2014-09-25T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: KV10Z32 FTM doesn't work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346585#M16886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Hello &lt;SPAN class="SpellE"&gt;Zhi&lt;/SPAN&gt; &lt;SPAN class="SpellE"&gt;Qu&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you create a project to reproduce your problem on a TWR-KV10?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to dig into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santiago&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 14:36:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346585#M16886</guid>
      <dc:creator>santiago_gonzal</dc:creator>
      <dc:date>2014-09-25T14:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: KV10Z32 FTM doesn't work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346586#M16887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached my project. You can comment out the &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Init_ADC() and &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;ADC0-&amp;gt;SC1[0] = 0x49 in main function and then add them back to see my problem with the CNT register in FTM0. I tried to use the micro trace buffer to track the problem but with this project, as long as I load the DBG_MTB.ini that worked for my KL25-Z, the program is locked in the &lt;/SPAN&gt;initialization&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; program trying to disable the watchdog timer. I've also attached the file for your reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zhi Qu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 14:47:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346586#M16887</guid>
      <dc:creator>zhiqu</dc:creator>
      <dc:date>2014-09-25T14:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: KV10Z32 FTM doesn't work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346587#M16888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhi Qu,&lt;/P&gt;&lt;P&gt;I'd like to highly recommend that you get to download the sample code package of the TWR-KV10Z32 board.&lt;/P&gt;&lt;P&gt;And it also contains the demos about the FTM module and I think it will help you to fix this issue, so you can refer to for details.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip" title="http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip"&gt;http://cache.freescale.com/files/32bit/software/TWR-KV10Z32_SC.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 06:25:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KV10Z32-FTM-doesn-t-work/m-p/346587#M16888</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-01-27T06:25:40Z</dc:date>
    </item>
  </channel>
</rss>

