<?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: Obtain trim value to 9S08PT60 microcontroller in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183127#M13521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that in BDM mode is necessary to copy:&lt;/P&gt;&lt;P&gt;0xFF6F in to 0x303A and bit 0 of 0xFF6E in to 0x303B.&lt;/P&gt;&lt;P&gt;In normal mode (see page 217 of the reference manual) it is loaded automatically at reset.&lt;/P&gt;&lt;P&gt;In this way it works,&amp;nbsp; but I didn’t found it in the manuals.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2012 15:35:27 GMT</pubDate>
    <dc:creator>fferraro</dc:creator>
    <dc:date>2012-10-24T15:35:27Z</dc:date>
    <item>
      <title>Obtain trim value to 9S08PT60 microcontroller</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183126#M13520</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´m working with new micro 9S08PT69 and I am trying to configure internal clock to obtain a ICSLCK signal of 10Mhz. To do that, I must configure FEI internal clock to 20MHz and there is this example on manual:&lt;/P&gt;&lt;P&gt;ICS_C2 = 0x00;&lt;/P&gt;&lt;P&gt;ICS_C1 = 0x04; // Internal refrence clock to FLL&lt;/P&gt;&lt;P&gt;ICS_C3 = 0x00; // I think here manual is wrong, this must be ICS_C2 = 0x00;&lt;/P&gt;&lt;P&gt;ICS_C3 = TRIM_VALUE_39K0625Hz // FLL clock to 20Mhz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is; Where does this TRIM_VALUE_39K0625Hz come from? I have seen in file 9s08pt60.s8p which is into my CW MCU v10.2 that exist this option: 09BIT_TRIM=303A/303B/01/FF6F/FF6E/000F4240/&lt;/P&gt;&lt;P&gt;Here, there is 2 bytes and ICS_C3 is only one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Must I load the value located in FF6E address into ICS_C3 (8 bits) &amp;nbsp;and the value of&amp;nbsp; FF6F into ICS_C4_SCFTRIM (1 bit) ? II´ve tried to do that and my programn doesnt work propertly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know.&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;Eneko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 22:25:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183126#M13520</guid>
      <dc:creator>Eneko</dc:creator>
      <dc:date>2012-07-25T22:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain trim value to 9S08PT60 microcontroller</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183127#M13521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that in BDM mode is necessary to copy:&lt;/P&gt;&lt;P&gt;0xFF6F in to 0x303A and bit 0 of 0xFF6E in to 0x303B.&lt;/P&gt;&lt;P&gt;In normal mode (see page 217 of the reference manual) it is loaded automatically at reset.&lt;/P&gt;&lt;P&gt;In this way it works,&amp;nbsp; but I didn’t found it in the manuals.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 15:35:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183127#M13521</guid>
      <dc:creator>fferraro</dc:creator>
      <dc:date>2012-10-24T15:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain trim value to 9S08PT60 microcontroller</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183128#M13522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to trim the Internal Oscilator of the MC9S08PT32 but I can not find the values of for trimming it. I also looked into the reference manual and in the example it has a value of &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;TRIM_VALUE_39K0625Hz&lt;/SPAN&gt;... could anyone post the corresponding values for trimming the internal oscilator?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 15:11:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183128#M13522</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2013-02-26T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain trim value to 9S08PT60 microcontroller</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183129#M13523</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;You generate a PE code for the device and in the that you will find the location defined for trimming.&lt;/P&gt;&lt;P&gt;In cpu.c &lt;/P&gt;&lt;P&gt;if (*(uint8_t*)0xFF6FU != 0xFFU) {&amp;nbsp;&amp;nbsp; /* Test if the device trim value is stored on the specified address */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICS_C3 = *(uint8_t*)0xFF6FU;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initialize ICS_C3 register from a non volatile memory */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICS_C4 = (uint8_t)((*(uint8_t*)0xFF6EU) &amp;amp; (uint8_t)0x01U); /* Initialize ICS_C4 register from a non volatile memory */&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When you program in the debug configurations you go to advanced programming options. In this you will find the option to enable trimming of the oscillator.&amp;nbsp; You enter the frequency to which you want the oscillator to be trimmed to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link for the steps: &lt;A href="http://mcuoneclipse.com/2012/05/08/trimming-s08-with-pe/" title="http://mcuoneclipse.com/2012/05/08/trimming-s08-with-pe/"&gt;Trimming S08 with P&amp;amp;amp;amp;E | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PE mult link&amp;nbsp; will trim the internal RC to the value you have programmed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the debug mode you can go to the Non volatile locations of the flash (corresponding to ICS TRIM ) to check for the value programmed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 04:40:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Obtain-trim-value-to-9S08PT60-microcontroller/m-p/183129#M13523</guid>
      <dc:creator>deepakrana</dc:creator>
      <dc:date>2013-02-28T04:40:01Z</dc:date>
    </item>
  </channel>
</rss>

