<?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>Kinetis MicrocontrollersのトピックLDVAL0 trigger calculation FRDM-K64F.</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LDVAL0-trigger-calculation-FRDM-K64F/m-p/396645#M21849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem with the calculation of the LDVAL0 trigger, in the reference manual is the equation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LDVAL trigger = (period / clock period) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is exactly the clock period, is 8.3ns (120MHz) for this case or 20ns (50Mhz) because in the reference manual tells that the PIT clock has a frequency of 50Mhz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with both and the result is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//PIT initialization&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIM_SCGC6 |= SIM_SCGC6_PIT_MASK; // Turn on clock to to the PIT module&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; PIT_LDVAL0 = ????;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Timeout period = 500us&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_MCR = PIT_MCR_FRZ_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable clock for PIT, freeze PIT in debug mode&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL0 = PIT_TCTRL_TIE_MASK | // Enable PIT interrupt&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL_TEN_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // and PIT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 May 2015 22:39:54 GMT</pubDate>
    <dc:creator>josealonsovalle</dc:creator>
    <dc:date>2015-05-02T22:39:54Z</dc:date>
    <item>
      <title>LDVAL0 trigger calculation FRDM-K64F.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LDVAL0-trigger-calculation-FRDM-K64F/m-p/396645#M21849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem with the calculation of the LDVAL0 trigger, in the reference manual is the equation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LDVAL trigger = (period / clock period) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is exactly the clock period, is 8.3ns (120MHz) for this case or 20ns (50Mhz) because in the reference manual tells that the PIT clock has a frequency of 50Mhz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with both and the result is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//PIT initialization&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIM_SCGC6 |= SIM_SCGC6_PIT_MASK; // Turn on clock to to the PIT module&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; PIT_LDVAL0 = ????;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Timeout period = 500us&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_MCR = PIT_MCR_FRZ_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable clock for PIT, freeze PIT in debug mode&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL0 = PIT_TCTRL_TIE_MASK | // Enable PIT interrupt&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_TCTRL_TEN_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // and PIT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2015 22:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LDVAL0-trigger-calculation-FRDM-K64F/m-p/396645#M21849</guid>
      <dc:creator>josealonsovalle</dc:creator>
      <dc:date>2015-05-02T22:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: LDVAL0 trigger calculation FRDM-K64F.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LDVAL0-trigger-calculation-FRDM-K64F/m-p/396646#M21850</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;PIT module reference clock is bus clock, which could up to 60MHz of K64 product.&lt;/P&gt;&lt;P&gt;The K64 reference manual has an example at chapter&amp;nbsp; 41.5 Initialization and application information.&lt;/P&gt;&lt;P&gt;At the example, bus clock is 50MHz and want to get 5.12ms interrupt, the LDVAL1 register value is 255999.&lt;/P&gt;&lt;P&gt;Customer need to check the K64 bus clock frequency, if the bus clock frequency is 60MHz, the PIT clock period is 16.67ns.&lt;/P&gt;&lt;P&gt;If customer want to generate period 500us interrupt, the LDVAL0 register value is:&lt;/P&gt;&lt;P&gt;(500000/16.67) - 1 =&amp;nbsp; 29993&lt;/P&gt;&lt;P&gt;Wish it helps. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&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>Mon, 04 May 2015 02:46:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LDVAL0-trigger-calculation-FRDM-K64F/m-p/396646#M21850</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-05-04T02:46:41Z</dc:date>
    </item>
  </channel>
</rss>

