<?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: SCI  just works on DEBUGGING MODE in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220504#M19174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well i have found it. May be is a stupid mistake of mine but if someone gets this error this is the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default the Trim Register &amp;nbsp;has a value of 0x80 (for QG8) but when in debugging mode the value is altered to 0xA8 and this is the velocity to work on. So what you have to do is just modify this value to 0xA8 on ICSTRM register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time and excuse my poor english.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Sep 2010 07:33:02 GMT</pubDate>
    <dc:creator>Master_col</dc:creator>
    <dc:date>2010-09-04T07:33:02Z</dc:date>
    <item>
      <title>SCI  just works on DEBUGGING MODE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220502#M19172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone , and thanks for your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well my problem is that i receive data on SCI on debugging mode perfectly, but when i re-power my target the NF(noise Flag) from SCIS1 sets and i receive a bad data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This confuse me a lot cause in debugging mode works ok, but i power off and then on my target and this problem happens. This is how i initialize my SCI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;void init_SCI(void){&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIBDH=0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIBDL=52; &amp;nbsp; &amp;nbsp; // 9600 bps para 8MHz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIC2_RE=1; &amp;nbsp; &amp;nbsp;// Rx enable&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIC2_TE=1; &amp;nbsp; &amp;nbsp;// Tx enable&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIC2_RIE=1; &amp;nbsp; // interrupt rx enable&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCIS1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// clear flag &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SCID;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just generate an interrupt when a data is ready on Rx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my Interrupt rutine for Rx:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;interrupt 17 void ISR_SCI_RX(void){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // tilt_led();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Si hay Noise Flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(SCIS1_NF==1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PTAD_PTAD1=1;// avisa por led&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SCIS1; &amp;nbsp; // limipa bandera de NF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SCID; &amp;nbsp; &amp;nbsp;//&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;goto out_SCI;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else{ PTAD_PTAD1=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SCIS1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RS232_data=SCID; &amp;nbsp; &amp;nbsp;// read data&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SCID=RS232_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(!SCIS1_TDRE); // wait sent &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out_SCI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;asm NOP;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 06:17:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220502#M19172</guid>
      <dc:creator>Master_col</dc:creator>
      <dc:date>2010-09-04T06:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: SCI  just works on DEBUGGING MODE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220503#M19173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that when in debug mode the clock of the MCU its normal but after RE POWER the target (no debug) the source clock is a bit faster why it could be this? am i missing something? this is my initializacion for the QG8:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ICSC2_BDIV=0; // &amp;nbsp;8MHz clk &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;SOPT1_COPE=0; // DISABLE watchdog&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;asm RSP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 06:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220503#M19173</guid>
      <dc:creator>Master_col</dc:creator>
      <dc:date>2010-09-04T06:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: SCI  just works on DEBUGGING MODE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220504#M19174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well i have found it. May be is a stupid mistake of mine but if someone gets this error this is the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default the Trim Register &amp;nbsp;has a value of 0x80 (for QG8) but when in debugging mode the value is altered to 0xA8 and this is the velocity to work on. So what you have to do is just modify this value to 0xA8 on ICSTRM register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time and excuse my poor english.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 07:33:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220504#M19174</guid>
      <dc:creator>Master_col</dc:creator>
      <dc:date>2010-09-04T07:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: SCI  just works on DEBUGGING MODE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220505#M19175</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;Are you programming the device using P&amp;amp;E USB Multilink Interface?&amp;nbsp; Do you calibrate the trim value during this process?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your initialisation code should then explicitly&amp;nbsp;transfer the NVTRIM value stored within flash, into the TRIM register.&amp;nbsp; Note that there will likely be considerable unit to unit variation of the required trim value to produce the specific bus frequency.&amp;nbsp; Therefore trim calibration should always be done during programming, when you utilize the internal clock reference.&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>Sun, 05 Sep 2010 11:30:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220505#M19175</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-05T11:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: SCI  just works on DEBUGGING MODE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220506#M19176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes thank you, that's what i didn't know i think it was auto calibrated. =)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 04:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-just-works-on-DEBUGGING-MODE/m-p/220506#M19176</guid>
      <dc:creator>Master_col</dc:creator>
      <dc:date>2010-09-06T04:21:05Z</dc:date>
    </item>
  </channel>
</rss>

