<?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: Counter clock source and accessing the FTM CnSC and CnV registers in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343010#M16629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the frequency and timing figured out, an external 20MHz crystal will be used (the same as for the system clock).&lt;/P&gt;&lt;P&gt;Unfortunately I can not open the examples since I use Keil uVision5 and there is still the problem with CnV and CnSC registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question about the timer functionality.&lt;/P&gt;&lt;P&gt;When the value in CnV register reaches a predefined value (1562) it sets the output to high.&lt;/P&gt;&lt;P&gt;Will the timer still count until it reaches the value stored in MOD register?&lt;/P&gt;&lt;P&gt;If yes that means I can use the timer interrupt to clear the previously set pin?&lt;/P&gt;&lt;P&gt;For example: The timer counts to 100 and at 100 it sets a pin high and continues to count.&lt;/P&gt;&lt;P&gt;The value in the MOD register equals a time of 110 so when the timer counts to this value it sets the interrupt and resets.&lt;/P&gt;&lt;P&gt;In the ISR i then turn the pin low and disable the timer (I enable the timer in another ISR). &lt;/P&gt;&lt;P&gt;So the pin would be 100us low, then 10us high and then low again.&lt;/P&gt;&lt;P&gt;I hope I was clear of what I am trying to achieve and if this is even possible. I read the datasheet and nowhere was written that this could not work but I am still unsure if it is possible :smileyhappy:.&lt;/P&gt;&lt;P&gt;Thank you for helping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2015 16:25:52 GMT</pubDate>
    <dc:creator>jure1</dc:creator>
    <dc:date>2015-03-24T16:25:52Z</dc:date>
    <item>
      <title>Counter clock source and accessing the FTM CnSC and CnV registers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343008#M16627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am a starter in ARM programming and I am using MKE04Z8VTG4 MCU.&lt;/P&gt;&lt;P&gt;I am a bit unsure if I understood the reference manual correctly. If I use fixed frequency clock for timer clock source the frequency will be about 37.5kHz?&lt;/P&gt;&lt;P&gt;Is there any way to determine the exact frequency if I use 20MHz external crystal?&lt;/P&gt;&lt;P&gt;Also how do I determine the exact system clock if I use an external 20MHz crystal?&lt;/P&gt;&lt;P&gt;Are there any advantages/disadvantages for either of the clock sources (except the higher frequency of course)? I will require 10kHz frequency so I think it does not matter which one I choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another problem I am having is writing to CnSC and CnV registers (FTM2). I can't seem to be able to figure it out how to do it. &lt;/P&gt;&lt;P&gt;For other registers I use for example: FTM2 -&amp;gt; POL |= (1 &amp;lt;&amp;lt; 5)&lt;/P&gt;&lt;P&gt;So how do I write to these two in the same (similar) way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still having a bit of problems figuring a lot of stuff out so I appreciate all the help (everyone was a beginner once) :smileyhappy:.&lt;/P&gt;&lt;P&gt;With regards, Jure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 23:17:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343008#M16627</guid>
      <dc:creator>jure1</dc:creator>
      <dc:date>2015-03-23T23:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Counter clock source and accessing the FTM CnSC and CnV registers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343009#M16628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jure Stojs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a 10kHz, then, you have to use an external crystal.&lt;/P&gt;&lt;P&gt;MKE04 provides an internal low range reference clock, but this clock frequency can be multiplied by FLL or PLL to a very high frequency such like 20MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For coding issue, I would suggest referencing demos of FRDM-KE04Z which can be downloaded from the below link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KE04Z&amp;amp;lang_cd=" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KE04Z&amp;amp;lang_cd="&gt;Freescale Freedom Development Platform for th|Freescale&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the file name is FRDM-KE04_QSP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 09:41:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343009#M16628</guid>
      <dc:creator>Rick_Li</dc:creator>
      <dc:date>2015-03-24T09:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counter clock source and accessing the FTM CnSC and CnV registers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343010#M16629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the frequency and timing figured out, an external 20MHz crystal will be used (the same as for the system clock).&lt;/P&gt;&lt;P&gt;Unfortunately I can not open the examples since I use Keil uVision5 and there is still the problem with CnV and CnSC registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question about the timer functionality.&lt;/P&gt;&lt;P&gt;When the value in CnV register reaches a predefined value (1562) it sets the output to high.&lt;/P&gt;&lt;P&gt;Will the timer still count until it reaches the value stored in MOD register?&lt;/P&gt;&lt;P&gt;If yes that means I can use the timer interrupt to clear the previously set pin?&lt;/P&gt;&lt;P&gt;For example: The timer counts to 100 and at 100 it sets a pin high and continues to count.&lt;/P&gt;&lt;P&gt;The value in the MOD register equals a time of 110 so when the timer counts to this value it sets the interrupt and resets.&lt;/P&gt;&lt;P&gt;In the ISR i then turn the pin low and disable the timer (I enable the timer in another ISR). &lt;/P&gt;&lt;P&gt;So the pin would be 100us low, then 10us high and then low again.&lt;/P&gt;&lt;P&gt;I hope I was clear of what I am trying to achieve and if this is even possible. I read the datasheet and nowhere was written that this could not work but I am still unsure if it is possible :smileyhappy:.&lt;/P&gt;&lt;P&gt;Thank you for helping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 16:25:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343010#M16629</guid>
      <dc:creator>jure1</dc:creator>
      <dc:date>2015-03-24T16:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counter clock source and accessing the FTM CnSC and CnV registers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343011#M16630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jure Stojs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please download KEXX_DRIVERS_V1.2.1_DEVD, the driver library package, it also contains a lot of examples for Keil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 01:29:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343011#M16630</guid>
      <dc:creator>Rick_Li</dc:creator>
      <dc:date>2015-03-25T01:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Counter clock source and accessing the FTM CnSC and CnV registers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343012#M16631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for posting this, I got everything I needed (and a lot more).&lt;/P&gt;&lt;P&gt;I got the timer configured properly and now it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 14:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Counter-clock-source-and-accessing-the-FTM-CnSC-and-CnV/m-p/343012#M16631</guid>
      <dc:creator>jure1</dc:creator>
      <dc:date>2015-03-25T14:10:55Z</dc:date>
    </item>
  </channel>
</rss>

