<?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: MC9S08QG8 SCI baudrate veriation when flashing in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227780#M23267</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Hello,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you use the internal oscillator, if you want accurate frequency, you have to use the trim register (ICSTRM see data-sheet chapter 10 ), and look at options to your programming tool, you probably found something about that.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emmanuel&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 08:02:04 GMT</pubDate>
    <dc:creator>Nouchi</dc:creator>
    <dc:date>2021-02-08T08:02:04Z</dc:date>
    <item>
      <title>MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227746#M23266</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working with a MC9S08QG8 and Codewarrior V11 and I am using the SCI component (among others) so that I can have serial communication with the embedded hosting board from a custom software tried before.&lt;/P&gt;&lt;P&gt;When debugging, the communication works fine, but after I "Flash File to Target", thinking in production, the baudrate of the micro controller changes from 19230.769 to 21000 baud aproximattely.&lt;/P&gt;&lt;P&gt;I think that the timer is also afected, so I can deduce that the internal clock frequency is changing...&lt;/P&gt;&lt;P&gt;I have tried to program the micro controller with the .abs, .abs.args, .abs.s19 but with all of them the result is the same.&lt;/P&gt;&lt;P&gt;So, any idea of what can be goin on and how to fix it?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227746#M23266</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-08T07:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227780#M23267</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you use the internal oscillator, if you want accurate frequency, you have to use the trim register (ICSTRM see data-sheet chapter 10 ), and look at options to your programming tool, you probably found something about that.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emmanuel&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 08:02:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227780#M23267</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2021-02-08T08:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227803#M23268</link>
      <description>&lt;P&gt;Hello Emmanuel,&lt;/P&gt;&lt;P&gt;Thank you for your answer, it's been very useful!&lt;/P&gt;&lt;P&gt;With your hint, I realized that the processor expert does not initialize the trim value registers.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="egoitztoledo_0-1612773225009.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136737i87E3C9201F21775E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="egoitztoledo_0-1612773225009.png" alt="egoitztoledo_0-1612773225009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems that when debugging, the values are inserted anyway, but not when flashing, so I introduce the needed values by "hand" and it works properly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="egoitztoledo_1-1612773487380.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136738i297706A59F848AB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="egoitztoledo_1-1612773487380.png" alt="egoitztoledo_1-1612773487380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wonder why the PE doesn't generate that code if it give you the option to select it...&lt;BR /&gt;Anyway, thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 08:38:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1227803#M23268</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-08T08:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228019#M23269</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;I just realized that this is not the solution...every time I debug a diferent micro, I can see that the values of those registers (ICSTRM and ICSSC) change for each.&lt;/P&gt;&lt;P&gt;I don't know where and how the values of those registers are calculated and inserted, because they already appear before start running the code...&lt;/P&gt;&lt;P&gt;When flashing, those registers have 0x80 and 0x00 values by default.&lt;/P&gt;&lt;P&gt;So, how can those values be inserted automatically without debugging?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 14:04:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228019#M23269</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-08T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228317#M23270</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Please add the following lines on the star08.c file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* System clock initialization */&lt;BR /&gt;/*lint -save -e923 Disable MISRA rule (11.3) checking. */&lt;BR /&gt;if (*(uint8_t*)0xFFAFU != 0xFFU) { /* Test if the device trim value is stored on the specified address */&lt;BR /&gt;ICSTRM = *(uint8_t*)0xFFAFU; /* Initialize ICSTRM register from a non volatile memory */&lt;BR /&gt;ICSSC = *(uint8_t*)0xFFAEU; /* Initialize ICSSC register from a non volatile memory */&lt;BR /&gt;}&lt;BR /&gt;/*lint -restore Enable MISRA rule (11.3) checking. */&lt;BR /&gt;/* ICSC1: CLKS=0,RDIV=0,IREFS=1,IRCLKEN=0,IREFSTEN=0 */&lt;BR /&gt;setReg8(ICSC1, 0x04U); /* Initialization of the ICS control register 1 */ &lt;BR /&gt;/* ICSC2: BDIV=1,RANGE=0,HGO=0,LP=0,EREFS=0,ERCLKEN=0,EREFSTEN=0 */&lt;BR /&gt;setReg8(ICSC2, 0x40U); /* Initialization of the ICS control register 2 */ &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this will help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have a good day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 23:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228317#M23270</guid>
      <dc:creator>vicentegomez</dc:creator>
      <dc:date>2021-02-08T23:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228547#M23271</link>
      <description>&lt;P&gt;Hello Vicente,&lt;/P&gt;&lt;P&gt;I really appreciate your answer, but I have already tried that as PE generates the code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="egoitztoledo_0-1612851292951.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136853iC60B3797110C1EA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="egoitztoledo_0-1612851292951.png" alt="egoitztoledo_0-1612851292951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case happens the same, by the time I connect for debug, without running yet, the selected memory locations already have the correct values, but if I flash, the value for both positions is 0xFF, so again the clock frequency is not correct...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 06:15:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1228547#M23271</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-09T06:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1229019#M23274</link>
      <description>&lt;P&gt;mmmm weird&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also set the trim value on the debug configuration options&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Debug configuration/Edit/Advance debug.../ and then select the value that you need for the internal clock&lt;/P&gt;
&lt;P&gt;Please check the following picture&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vicentegomez_0-1612908060412.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136923i9FA699903A13BD51/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vicentegomez_0-1612908060412.png" alt="vicentegomez_0-1612908060412.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 22:01:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1229019#M23274</guid>
      <dc:creator>vicentegomez</dc:creator>
      <dc:date>2021-02-09T22:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1229161#M23276</link>
      <description>&lt;P&gt;Thank you for your answer Vicente.&lt;/P&gt;&lt;P&gt;I asked also support to PEmicro, and according to what they say, when debugging, in my case with a Multilink, it's PEmicro's implementation and trimming works fine, but the "Flash File to Target" option is Codewarrior's implementation and this functionallity may not be implemented eventhough the option appears as well.&lt;/P&gt;&lt;P&gt;By the way, it seems that the Cyclone programmer has also the functionallity, so, in that case, the issue would be resolved. Soon I will have the oportunity to try it, so I will let you know.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 06:21:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1229161#M23276</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-10T06:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QG8 SCI baudrate veriation when flashing</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1236670#M23297</link>
      <description>&lt;P&gt;Indeed, the PEmicro's "Cyclone Image Creation" software has the posibility to calculate and program the trim value. I have tried it with a Cyclone FX and it works properly, so that solves my problem.&lt;/P&gt;&lt;P&gt;Thank you to all for your responses.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 14:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QG8-SCI-baudrate-veriation-when-flashing/m-p/1236670#M23297</guid>
      <dc:creator>egoitztoledo</dc:creator>
      <dc:date>2021-02-25T14:27:12Z</dc:date>
    </item>
  </channel>
</rss>

