<?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 k40 problem with UART in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228124#M4699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a problem with UART - I'm trying to send data to computer, but get only garbrage. I tried to on/off parity with 8/9 bits, but it doesn't help. Data cable is ok (i tried 2 cables). Send data with TWR-SER. &lt;/P&gt;&lt;P&gt;send with^&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while(!(UART3_S1) &amp;amp; UART_S1_TDRE_MASK));&lt;/P&gt;&lt;P&gt;UART_D = 0xFF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i get date like 7F&lt;/P&gt;&lt;P&gt;or sometimes different data BF FF FD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the problem?&lt;/P&gt;&lt;P&gt;Thx for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jan 2013 10:37:39 GMT</pubDate>
    <dc:creator>GerasinIvan</dc:creator>
    <dc:date>2013-01-17T10:37:39Z</dc:date>
    <item>
      <title>k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228124#M4699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a problem with UART - I'm trying to send data to computer, but get only garbrage. I tried to on/off parity with 8/9 bits, but it doesn't help. Data cable is ok (i tried 2 cables). Send data with TWR-SER. &lt;/P&gt;&lt;P&gt;send with^&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while(!(UART3_S1) &amp;amp; UART_S1_TDRE_MASK));&lt;/P&gt;&lt;P&gt;UART_D = 0xFF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i get date like 7F&lt;/P&gt;&lt;P&gt;or sometimes different data BF FF FD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the problem?&lt;/P&gt;&lt;P&gt;Thx for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 10:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228124#M4699</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-01-17T10:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228125#M4700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Baud rate.??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 18:15:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228125#M4700</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-01-17T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228126#M4701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Baud rate is the same - 9600 on putty/Comport ToolKit, and 9600.1454 on k40 (setted in DeviceInit)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 05:25:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228126#M4701</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-01-18T05:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228127#M4702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We used PE to set up our RS232 on UART2 with no issues...&amp;nbsp; Even have the options to change Baud-rate on the fly.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have seen in other post that UART3 on some KXX's uses a different clock source , no firsthand knowledge of that if it is your issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Look for updates to Device Init.&lt;/P&gt;&lt;P&gt;Try any examples for TWR-SER you can find.. and Call a FS FAE directly for assistance.&lt;/P&gt;&lt;P&gt;But you may already be have gone thru all this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 23:49:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228127#M4702</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-01-18T23:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228128#M4703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you get your UART settings? Are you using RTS/CTS, pairity etc?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2013 14:42:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228128#M4703</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-01-19T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228129#M4704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I use UART on the K20 tower board but it should be about the same for the K40.&lt;/P&gt;&lt;P&gt;UART0 and UART1 use the core clock the other UART channels are using the bus clock. In my case the core clock is twice as fast as the bus clock.&lt;/P&gt;&lt;P&gt;The UART init function within the drivers (uart.c) is only turning on the clock, enables tx/rx and sets the clock divider bits srb and brfa. The only thing left to do is giving the Pins the right function (e.g. PORT_PCR_MUX(0x3)).&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/* Calculate baud settings */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;sbr = (uint16)((sysclk*1000)/(baud * 16));&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/* Determine if a fractional divider is needed to get closer to the baud rate */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;brfa = (((sysclk*32000)/(baud * 16)) - (sbr * 32));&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Maybe you are doing the sbr calculation wrong. brfa is not important when setting slow baudrates and its wrong anyway (overflow occures, what caused me some troubles by setting baudrate to 921'600).&lt;/P&gt;&lt;P&gt;If you do these settings you should see 10 bits with the KO (start,data,stop --&amp;gt; the lsb comes first)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2013 18:30:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228129#M4704</guid>
      <dc:creator>lothar</dc:creator>
      <dc:date>2013-01-19T18:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228130#M4705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we use 9600 no parity no rts/cts.&lt;/P&gt;&lt;P&gt;The following calls sets Baudrate with UART_MODULE_CLOCK at 47.75MHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UART_PDD_SetBaudRateFineAdjust(UART2_BASE_PTR, baudFineAdj[newBaud]);&lt;/P&gt;&lt;P&gt;UART_PDD_SetBaudRate(UART2_BASE_PTR, baudDivisor[newBaud]);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 9600 baud&lt;/P&gt;&lt;P&gt;baudDivisor =310&lt;/P&gt;&lt;P&gt;baudFineAdjust=28&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 20:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228130#M4705</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-01-22T20:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228131#M4706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, i looked at "System Clock" in Component Inspector, and saw that "Core clock" - 29.97Mhz and the "Bus clock" is the same. What is it? As I know, Core should be 50MHz (or above), and bus in half of that value. And i free to change it. I think it's not right.&lt;/P&gt;&lt;P&gt;And another question: can i directly connect rs232 connector to UART pins or must i use any micro's to convert signal?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:12:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228131#M4706</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-01-28T06:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228132#M4707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FS FAE? What is it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:23:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228132#M4707</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-01-28T06:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228133#M4708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Freescale Field Application Engineer. Should be able to request assistance from a local office or on line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 17:37:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228133#M4708</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-01-28T17:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228134#M4709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Experiment with the clock if you cannot find the settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Check the KQRUG doc and other guides, and the K40 Resource manual: &lt;A href="http://bit.ly/WxlIak" title="http://bit.ly/WxlIak"&gt;http://bit.ly/WxlIak&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the connection: The UART pins are 3.3v signals, RS232 are higher and swing + and -.&lt;/P&gt;&lt;P&gt;Look at the Tower Serial&amp;nbsp; schematics.&amp;nbsp; The RS232 9-pin connector is connected through a level shifter IC U6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 18:29:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228134#M4709</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-01-28T18:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228135#M4710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any update.. have you found the solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228135#M4710</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-02-14T19:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228136#M4711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't free time to work at this problem, but i suggest that there it's problem with Device Initializator. Than i used a PWM on FlexTimer, it shows that period is 20.00 ms, but really it wasn't. To make 20ms period, i configured DI, that it shows about 23.~~ ms. I saw it with oscilloscope. So, in next week i will try UART once more. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 04:05:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228136#M4711</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-02-15T04:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228137#M4712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, as i previously said - it's problem with DevInit. For 9600 on receiver, i set Baud Rate Divisor 165. And DI calculate baud rate - 7897. May be i should change processor freq in settings of DI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 12:05:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228137#M4712</guid>
      <dc:creator>GerasinIvan</dc:creator>
      <dc:date>2013-02-26T12:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: k40 problem with UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228138#M4713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or change the DI divisor?? Perhaps someone with experience with DI can confirm. (ours was done with PE).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 18:12:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k40-problem-with-UART/m-p/228138#M4713</guid>
      <dc:creator>Jack_at_Oxigraf</dc:creator>
      <dc:date>2013-02-26T18:12:50Z</dc:date>
    </item>
  </channel>
</rss>

