<?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: kinteis k10 uart program error in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960658#M55022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ganesh,&lt;/P&gt;&lt;P&gt;I think this may the baudrate problem. First, please clarify what kind of K10 are you using. You use K10DZ10.h. This is form 100Mhz main clock device. But in your code, you use 72M to calculate SBR. Second, after reset, the chip clock is in FEI mode. FLL output 20.97M clock to system. You should initialize the clock first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2019 03:28:58 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2019-09-25T03:28:58Z</dc:date>
    <item>
      <title>kinteis k10 uart program error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960657#M55021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a custom board with k10mcu mk10dx256. IM trying to implement uart program with it.I have attached the program.I am getting a garbage value on my serial terminal.&lt;/P&gt;&lt;P&gt;heres my program:&lt;/P&gt;&lt;P&gt;#include &amp;lt;__cross_studio_io.h&amp;gt;&lt;BR /&gt;#include "MK10DZ10.h"&lt;/P&gt;&lt;P&gt;main(){&lt;BR /&gt;char data = 'a';&lt;BR /&gt;int i;&lt;BR /&gt; unsigned long int SBR_value=0;&lt;BR /&gt;char data1,ch;&lt;/P&gt;&lt;P&gt;//pin selection&lt;BR /&gt;SIM_SCGC5 |= SIM_SCGC5_PORTD_MASK;&lt;BR /&gt;PORTD_PCR3 |= PORT_PCR_MUX(3);&lt;BR /&gt;PORTD_PCR2 |= PORT_PCR_MUX(3);&lt;BR /&gt;//uart selection&lt;BR /&gt;SIM_SCGC4 |= SIM_SCGC4_UART2_MASK;&lt;BR /&gt;UART2_C2 |= (1&amp;lt;&amp;lt;3)|(1&amp;lt;&amp;lt;2);&lt;/P&gt;&lt;P&gt;SBR_value = (int) ( (72*1000000)/ ( 16 * 9600) ) ;&lt;BR /&gt; UART2_BDH |= ( ( SBR_value &amp;gt;&amp;gt; 8 ) &amp;amp; 0x1F );&lt;BR /&gt; UART2_BDL = ( SBR_value &amp;amp; 0xFF );&lt;BR /&gt;&lt;BR /&gt;while(1)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;while( !(( UART2_S1 &amp;gt;&amp;gt; 7) &amp;amp; 0x01));&lt;BR /&gt; ch|= data;&lt;BR /&gt; UART2_D |=ch;&lt;BR /&gt;debug_printf("sending\n %s \n %d \n ",data,i#);}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;span class="lia-inline-image-display-wrapper" image-alt="Untitled.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/89253i6FDF00159E4F7CFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m getting interrupts but my data is not able to captured in receive program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2019 05:59:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960657#M55021</guid>
      <dc:creator>gnsh2196</dc:creator>
      <dc:date>2019-09-24T05:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: kinteis k10 uart program error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960658#M55022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ganesh,&lt;/P&gt;&lt;P&gt;I think this may the baudrate problem. First, please clarify what kind of K10 are you using. You use K10DZ10.h. This is form 100Mhz main clock device. But in your code, you use 72M to calculate SBR. Second, after reset, the chip clock is in FEI mode. FLL output 20.97M clock to system. You should initialize the clock first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 03:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960658#M55022</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-09-25T03:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: kinteis k10 uart program error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960659#M55023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt;// MCG_C1 Reg Config&lt;/P&gt;&lt;P&gt;MCG_C1 &amp;amp;= ( MCG_C1_CLKS(0x00) | MCG_C1_FRDIV(0x00) );&lt;BR /&gt; MCG_C1 |= ( MCG_C1_IREFS_MASK | MCG_C1_IRCLKEN_MASK );&lt;/P&gt;&lt;P&gt;// MCG_C2 Reg Config&lt;BR /&gt; MCG_C2 = 0x00; // Disable all the functionalities&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//SYSTEM_FREQUENCY&lt;BR /&gt;// MCG_C4 Reg Config selecting the range to 60 - 72Mhz&lt;BR /&gt; MCG_C4 |= (MCG_C4_SCFTRIM_MASK | MCG_C4_DMX32_MASK );&lt;BR /&gt; MCG_C4 |= ( 1 &amp;lt;&amp;lt; ( MCG_C4_DRST_DRS_SHIFT + 1) ) ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//---------- SIM Module&lt;/P&gt;&lt;P&gt;SIM_SOPT2 &amp;amp;= ~(SIM_SOPT2_PLLFLLSEL_MASK); // Selecting the FLL&lt;BR /&gt;// common for 72Mhz&amp;nbsp;&lt;BR /&gt; SIM_CLKDIV1 |= ((SIM_CLKDIV1_OUTDIV4(0x02)) | (SIM_CLKDIV1_OUTDIV3(0x01)) | (SIM_CLKDIV1_OUTDIV2(0x01)) | (SIM_CLKDIV1_OUTDIV1(0x00) ) );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my clock configuration&lt;/P&gt;&lt;P&gt;for 72mhz.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Untitleda.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/90830iF39B9B15B478034C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitleda.png" alt="Untitleda.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my output after&amp;nbsp; configuring the clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 05:30:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960659#M55023</guid>
      <dc:creator>gnsh2196</dc:creator>
      <dc:date>2019-09-25T05:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: kinteis k10 uart program error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960660#M55024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you use a oscilloscope to check the baudrate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 09:20:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960660#M55024</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-09-25T09:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: kinteis k10 uart program error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960661#M55025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp; for your help i have figured it out. there seems to be change in the baud rate calculation.&lt;/P&gt;&lt;P&gt;current baudrate&amp;nbsp; was set as 19200.&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 10:56:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinteis-k10-uart-program-error/m-p/960661#M55025</guid>
      <dc:creator>gnsh2196</dc:creator>
      <dc:date>2019-09-25T10:56:28Z</dc:date>
    </item>
  </channel>
</rss>

