<?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: TRM HOW CALCULATE this value? in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191115#M14654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;thanks for your answer is very important for my this ; really I was wrong&amp;nbsp;&lt;/STRONG&gt; &lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt; , now understand better this modulo very thanks for all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Apr 2010 01:34:13 GMT</pubDate>
    <dc:creator>yecosuma</dc:creator>
    <dc:date>2010-04-19T01:34:13Z</dc:date>
    <item>
      <title>TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191105#M14644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;i want USE ICG MODULE in FEI mode&amp;nbsp; to multiply the internal reference 243khz for achieve 5.4 Mhz bus frecuency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want obtain&amp;nbsp;&amp;nbsp; the frequency to exactly 5.4 MHz. with the TRM .HOW CALCULATE the&amp;nbsp;ICGTRM&amp;nbsp;value? I must place this value in ICGTRM?&lt;/P&gt;&lt;P&gt;REFS IS SETTING IN 1 OR 0?&lt;/P&gt;&lt;P&gt;THANKS FOR YOU ANSWER&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 10:46:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191105#M14644</guid>
      <dc:creator>yecosuma</dc:creator>
      <dc:date>2010-04-12T10:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191106#M14645</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;I assume that you are still using the 'LC60 device.&amp;nbsp; The REFS control bit is important when using an external reference, to determine whether a crystal or an oscillator is in use.&amp;nbsp; For FEI mode, using the internal reference, this bit may be either state (don't care).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the ICG&amp;nbsp;trim value is determined during programming, the value to generate an internal reference frequency of 243kHz +/-0.5% will be programmed into flash address 0xFFBE (NVICGTRM).&amp;nbsp;&amp;nbsp;Within the&amp;nbsp;initialisation code, this value must then be transferred to the ICGTRM control register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With a MDF setting for multiplication factor 10, and RFD setting for division by 2, the nominal bus frequency would be 5.554 MHz.&amp;nbsp; To reduce the bus&amp;nbsp;frequency to 5.4 MHz, the period of the internal reference would need to increase by 2.85 percent, requiring an increase of the value written to ICGTRM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the bus frequency accuracy that you require, it may suffice to add a constant amount to the NVICGTRM value, before writing the ICGTRM register, based on the nominal trim step size parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, to achieve better accuracy, you would need to provide your own calibration procedure using an external timing reference (such as AC mains frequency or SCI received baud rate).&amp;nbsp; But this adds considerable complication.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 15:10:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191106#M14645</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-04-12T15:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191107#M14646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the QE128, CodeWarrior 6.3 programs the TRIM value for you when you program the flash.&lt;/P&gt;&lt;P&gt;P&amp;amp;E Micro are also coming up with tools to compute/program a custom TRIM value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 09:49:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191107#M14646</guid>
      <dc:creator>pbouf</dc:creator>
      <dc:date>2010-04-14T09:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191108#M14647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very thanks for you answer&lt;/P&gt;&lt;P&gt;I know the default value in this register is ICGTRM=$80 THEN the value that&amp;nbsp; should I will&amp;nbsp;to put is 2.85 of this value?&lt;/P&gt;&lt;P&gt;NVICGTRM=$7C&amp;nbsp;&amp;nbsp; IS THE VALUE for obtain a approximation nearest ?&amp;nbsp; NEWLY&amp;nbsp; THANKS BIGMAC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 08:57:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191108#M14647</guid>
      <dc:creator>yecosuma</dc:creator>
      <dc:date>2010-04-16T08:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191109#M14648</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;I think that I should clarify what I really meant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The POR default for ICGTRM is $80, however this will produce the &lt;U&gt;untrimmed&lt;/U&gt; reference frequency, which may differ from the nominal frequency of 243kHz by up to 25 percent.&amp;nbsp; The internal reference now needs to be trimmed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the trimming calibration has been done during programming, the flash location at $FFBE (NVICGTRM) will&amp;nbsp; contain a&amp;nbsp;trim value, usually&amp;nbsp;different than&amp;nbsp;$80,&amp;nbsp;that will trim the reference to 243kHz, and it is this value that is normally written to the ICGTRM register during initialisation.&amp;nbsp; If the trimming calibration has not been done, the flash address will contain the unprogrammed value of $FF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case, you actually need a reference frequency of 236.3kHz to provide a bus frequency of 5.4MHz.&amp;nbsp; This will require a &lt;U&gt;larger&lt;/U&gt; trim value than is present at $FFBE, to reduce the reference frequency.&amp;nbsp; Taking into account the trim range available, I would estimate that the value written to ICGTRM should be about decimal 15 larger than the value present at the $FFBE location.&amp;nbsp; However, you should check this experimentally during project development, to see whether this value provides the most accurate result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 12:59:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191109#M14648</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-04-16T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191110#M14649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello thanks for your answers are of very helpful for my ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont understand because the value written to ICGTRM should be 15 larger than the value present at the&amp;nbsp; $FFBE location,&lt;/P&gt;&lt;P&gt;I dont&amp;nbsp; understand&amp;nbsp; which is the initial value that I should to put in NVICGTRM?&lt;/P&gt;&lt;P&gt;sorry for my ignorance &lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Apr 2010 21:03:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191110#M14649</guid>
      <dc:creator>yecosuma</dc:creator>
      <dc:date>2010-04-17T21:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191111#M14650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.&amp;nbsp; The nice thing about NVICGTRM is that it is factory trimmed before ever hitting your hands.&amp;nbsp; If you are developing with Freescale CodeWarrior 6.2 or 6.3 (possibly others, but I only have experience with these two), then the value will automatically be pulled and re-programmed when you program your chip within CW.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I learned (the hard way) is that if you are programming for production, your program script must pull and copy NVICGTRM, because when you bulk-erase your flash memory, that value gets erased too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some code I put in all of my production code now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Copy TRM value.&lt;/P&gt;&lt;P&gt;ICGTRM = NVICGTRM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Verify that TRM value not erased.&lt;/P&gt;&lt;P&gt;if(ICGTRM == 0xFF)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICGTRM = 0x80;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way your TRIM values will always be pulled in from the factory TRIM values, which I have had nothing but good experiences with.&amp;nbsp; We make a warmer product that is time sensitive, and I have never seen a board with more than 0.3% error in the oscillator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best of luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Apr 2010 03:07:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191111#M14650</guid>
      <dc:creator>Darkn3ss</dc:creator>
      <dc:date>2010-04-18T03:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191112#M14651</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;The value at NVICGTRM is normally set by the programming adapter/software. The value is calculated to cause the internal oscillator to run at a pre-determined frequency. If your hardware/software does not do this for you and you need a accurate frequency then you will have to do this as a separate operation. The value that may be already programmed there is done at a specific voltage and temperature and may not be suitable for your case.&lt;/P&gt;&lt;P&gt;If the frequency of operation is not reachable by the normal setup it is possible to use the trim register to offset the oscillator frequency from the "normal" in order to achieve your own custom frequency. In order to utilise the "automatic" trim calculating facility of your programmer it is normal to allow this to still occur but add in the offset when the value is moved from the NV register into the working one.&lt;/P&gt;&lt;P&gt;BTW, I do not agree with the oft quoted methods of checking for the NV value to be programmed and then if not allowing the working register to be $80. If $80 is good enough for you sometimes it is good enough always! Either allow the $FF value to be transferred and stop SCI comms from working (or similar) or detect the failure to programme the trim and indicate it to the tester somehow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Apr 2010 06:22:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191112#M14651</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-04-18T06:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191113#M14652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ummmmmmmmm&lt;/P&gt;&lt;P&gt;according&amp;nbsp;your explication &amp;nbsp;&lt;/P&gt;&lt;P&gt;the value that I should to put in el NVICGTRM is 8F? it is true or I am wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Apr 2010 23:07:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191113#M14652</guid>
      <dc:creator>yecosuma</dc:creator>
      <dc:date>2010-04-18T23:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191114#M14653</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;You are incorrect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not program any specific value to NVICGTRM flash location, but let the programmer itself do the trim&amp;nbsp;calibration, and program the value that will give&amp;nbsp;the "standard" reference frequency of 243kHz.&amp;nbsp; Note that this value is usually &lt;U&gt;not&lt;/U&gt; $80.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then during initialisation,&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;ICGTRM = NVICGTRM + 15;&amp;nbsp; // Provides custom reference frequency&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 00:01:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191114#M14653</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-04-19T00:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: TRM HOW CALCULATE this value?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191115#M14654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;thanks for your answer is very important for my this ; really I was wrong&amp;nbsp;&lt;/STRONG&gt; &lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt; , now understand better this modulo very thanks for all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 01:34:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/TRM-HOW-CALCULATE-this-value/m-p/191115#M14654</guid>
      <dc:creator>yecosuma</dc:creator>
      <dc:date>2010-04-19T01:34:13Z</dc:date>
    </item>
  </channel>
</rss>

