<?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: PIT LDVAL issue using TimerUnit_LDD on Kinetis in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204941#M835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we will fix the PIT timing calculations according to the RM for next release of PEx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2012 22:42:03 GMT</pubDate>
    <dc:creator>ProcessorExpert</dc:creator>
    <dc:date>2012-02-10T22:42:03Z</dc:date>
    <item>
      <title>PIT LDVAL issue using TimerUnit_LDD on Kinetis</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204940#M834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a PIT timer on a Kinetis K10 to drive ADC sampling, using the TimerUnit_LDD PE component.&amp;nbsp; My sampling rate is slightly off, I think because the LDVAL value is being calculated incorrectly by PE.&lt;BR /&gt;&lt;BR /&gt;The datasheet (K10P81M100SF2RM Rev. 5, 8 May 2011) says on p. 985 the LDVAL register should be calculated this way:&lt;BR /&gt;LDVAL trigger = (period / clock period) - 1&lt;BR /&gt;&lt;BR /&gt;Which in my case:&lt;BR /&gt;Period: 5ms (I want a 200Hz sampling rate)&lt;BR /&gt;Clock Period: .5us (bus running at 2MHz)&lt;BR /&gt;&lt;BR /&gt;So:&lt;BR /&gt;LDVAL = (5000 / .5) - 1 = 9999&lt;BR /&gt;&lt;BR /&gt;If I enter 5ms into the Counter Restart / Period field, the generated code for the component has this:&lt;BR /&gt;&amp;nbsp; /* PIT_LDVAL0: TSV=0x2710 */&lt;BR /&gt;&amp;nbsp; PIT_LDVAL0 = (uint32_t)0x2710UL;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set up load register */&lt;BR /&gt;&lt;BR /&gt;The hex 0x2710 is decimal 10000, (off by one from what I was expecting), and this value gives me a slight error in my sampling rate.&amp;nbsp; My workaround for now is to enter a period of 4999.5us.&lt;BR /&gt;&lt;BR /&gt;I'm using CW 10.1 with what should be the latest PE 10.1 patches; I also tried with CW 10.2 and I see the same behavior. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The bottom of my generated files has this for versioning:&lt;BR /&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This file was created by Processor Expert 5.2 [04.49]&lt;BR /&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for the Freescale Kinetis series of microcontrollers.&lt;BR /&gt;&lt;BR /&gt;The top of the generated component file has this for versioning:&lt;BR /&gt;Project&amp;nbsp;&amp;nbsp; : ProcessorExpert&lt;BR /&gt;Processor : MK10DN512ZVLK10&lt;BR /&gt;Component : TimerUnit_LDD&lt;BR /&gt;Version&amp;nbsp;&amp;nbsp; : Component 01.122, Driver 01.05, CPU db: 3.00.001&lt;BR /&gt;Compiler&amp;nbsp; : CodeWarrior ARM C Compiler&lt;BR /&gt;&lt;BR /&gt;Let me know if this is a bug, or working as intended... then I'll know if I need to keep an eye on undoing this workaround if it gets modified.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 03:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204940#M834</guid>
      <dc:creator>ScottW</dc:creator>
      <dc:date>2012-02-10T03:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: PIT LDVAL issue using TimerUnit_LDD on Kinetis</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204941#M835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we will fix the PIT timing calculations according to the RM for next release of PEx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 22:42:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204941#M835</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-02-10T22:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: PIT LDVAL issue using TimerUnit_LDD on Kinetis</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204942#M836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's seems there is the same bug for the k60:&lt;/P&gt;&lt;P&gt;** Project : ProcessorExpert&lt;BR /&gt;** Processor : MK60DN512ZVMD10&lt;BR /&gt;** Component : TimerUnit_LDD&lt;BR /&gt;** Version : Component 01.123, Driver 01.06, CPU db: 3.00.003&lt;BR /&gt;** Compiler : IAR ARM C Compiler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which I could fix fast thanks to your post : )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;nbsp;&lt;/P&gt;&lt;P&gt;Emilien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 20:21:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PIT-LDVAL-issue-using-TimerUnit-LDD-on-Kinetis/m-p/204942#M836</guid>
      <dc:creator>emilien</dc:creator>
      <dc:date>2012-08-23T20:21:20Z</dc:date>
    </item>
  </channel>
</rss>

