<?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>Kinetis MicrocontrollersのトピックRe: LPUART0 FRDM K82F</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727959#M44513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to MCG_C4 with 32.768kHz reference mutiplied by FLL Factor 732 i receive&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;23986176.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I switched to internal fast clock 4Mhz and transmission seems to be working but the data i put do the register it's not what i receive on my PC so it seems like the baudrate is still off with new &amp;nbsp;formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I used this to switch for internal fast clock:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;MCG -&amp;gt; SC &amp;amp;= ~MCG_SC_FCRDIV_MASK;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MCG -&amp;gt; C1 |=MCG_C1_IRCLKEN_MASK |MCG_C1_IREFSTEN_MASK;&lt;BR /&gt; MCG -&amp;gt; C2 |=MCG_C2_IRCS_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIM -&amp;gt; SCGC5 |= SIM_SCGC5_PORTB_MASK;&lt;BR /&gt; SIM -&amp;gt; SCGC2 |= SIM_SCGC2_LPUART0_MASK;&lt;BR /&gt; SIM -&amp;gt; SOPT2 |= SIM_SOPT2_LPUARTSRC(3);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2018 05:21:16 GMT</pubDate>
    <dc:creator>akimata</dc:creator>
    <dc:date>2018-05-08T05:21:16Z</dc:date>
    <item>
      <title>LPUART0 FRDM K82F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727957#M44511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello i've been trying to send some informations throught UART for some time but i can't get it to work, i'm probably missing something. The problem is that if i check with logic analyzer my TX line i can&amp;nbsp; clearly see that data is correct but in realterm or any other software connected through USB-TTL only what i get is null(00).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my simple code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include "board.h"&lt;BR /&gt;#include "peripherals.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clock_config.h"&lt;BR /&gt;#include "MK82F25615.h"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;uint16_t sbr;&lt;/P&gt;&lt;P&gt;int main(void) {&lt;/P&gt;&lt;P&gt;/* Init board hardware. */&lt;BR /&gt; BOARD_InitBootPins();&lt;BR /&gt; BOARD_InitBootClocks();&lt;BR /&gt; BOARD_InitBootPeripherals();&lt;BR /&gt; /* Init FSL debug console. */&lt;BR /&gt; BOARD_InitDebugConsole();&lt;BR /&gt; SIM -&amp;gt; CLKDIV1 &amp;amp;= ~SIM_CLKDIV1_OUTDIV1_MASK;&lt;BR /&gt; SIM -&amp;gt; CLKDIV1 &amp;amp;= ~SIM_CLKDIV1_OUTDIV2_MASK;&lt;/P&gt;&lt;P&gt;SIM -&amp;gt; SCGC5 |= SIM_SCGC5_PORTB_MASK;&lt;BR /&gt; SIM -&amp;gt; SCGC2 |= SIM_SCGC2_LPUART0_MASK;&lt;BR /&gt; SIM -&amp;gt; SOPT2 |= SIM_SOPT2_LPUARTSRC(0x01);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCG -&amp;gt; C6 &amp;amp;= ~ MCG_C6_PLLS_MASK;&lt;BR /&gt; MCG -&amp;gt; C4 |= MCG_C4_DMX32_MASK;&lt;BR /&gt; MCG -&amp;gt; C4 |= MCG_C4_DRST_DRS(0);&lt;/P&gt;&lt;P&gt;PORTB-&amp;gt; PCR[16] = PORT_PCR_MUX(0x03);&lt;BR /&gt; PORTB-&amp;gt; PCR[17] = PORT_PCR_MUX(0x03);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; CTRL &amp;amp;= ~LPUART_CTRL_TE_MASK;&lt;BR /&gt; LPUART0 -&amp;gt; CTRL &amp;amp;= ~LPUART_CTRL_RE_MASK;&lt;BR /&gt; LPUART0 -&amp;gt; BAUD |=LPUART_BAUD_OSR(15);&lt;/P&gt;&lt;P&gt;sbr = (23986176/(16*9600));&lt;BR /&gt; LPUART0 -&amp;gt; BAUD |= LPUART_BAUD_SBR(sbr);&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; CTRL &amp;amp;= ~LPUART_CTRL_M_MASK;&lt;BR /&gt; LPUART0 -&amp;gt; CTRL &amp;amp;= ~LPUART_CTRL_PE_MASK;&lt;BR /&gt; LPUART0 -&amp;gt; BAUD &amp;amp;= ~LPUART_BAUD_SBNS_MASK;&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; CTRL |= LPUART_CTRL_TE_MASK;&lt;BR /&gt; LPUART0 -&amp;gt; CTRL |= LPUART_CTRL_RE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; CTRL |= LPUART_CTRL_TE_MASK;&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; DATA = 0x53;&lt;BR /&gt; while(!(LPUART0 -&amp;gt; STAT &amp;amp; LPUART_STAT_TC_MASK) );&lt;/P&gt;&lt;P&gt;LPUART0 -&amp;gt; CTRL &amp;amp;= ~LPUART_CTRL_TE_MASK;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; return 0 ;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? i'm suspecting baudrate but i have no idea what could be wrong in calculations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 May 2018 12:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727957#M44511</guid>
      <dc:creator>akimata</dc:creator>
      <dc:date>2018-05-06T12:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0 FRDM K82F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727958#M44512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rufus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What baud rate do you measure?&lt;BR /&gt;Is 23986176 the PLL/FLL speed that you really have?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more exact 9600 Baud calculation use:&lt;BR /&gt;&lt;STRONG&gt;(((LPUART_CLOCK/8/9600) + 1)/2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 20:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727958#M44512</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-05-07T20:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0 FRDM K82F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727959#M44513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to MCG_C4 with 32.768kHz reference mutiplied by FLL Factor 732 i receive&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;23986176.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I switched to internal fast clock 4Mhz and transmission seems to be working but the data i put do the register it's not what i receive on my PC so it seems like the baudrate is still off with new &amp;nbsp;formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I used this to switch for internal fast clock:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;MCG -&amp;gt; SC &amp;amp;= ~MCG_SC_FCRDIV_MASK;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MCG -&amp;gt; C1 |=MCG_C1_IRCLKEN_MASK |MCG_C1_IREFSTEN_MASK;&lt;BR /&gt; MCG -&amp;gt; C2 |=MCG_C2_IRCS_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIM -&amp;gt; SCGC5 |= SIM_SCGC5_PORTB_MASK;&lt;BR /&gt; SIM -&amp;gt; SCGC2 |= SIM_SCGC2_LPUART0_MASK;&lt;BR /&gt; SIM -&amp;gt; SOPT2 |= SIM_SOPT2_LPUARTSRC(3);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 05:21:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727959#M44513</guid>
      <dc:creator>akimata</dc:creator>
      <dc:date>2018-05-08T05:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0 FRDM K82F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727960#M44514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Grzegorz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You really need to "measure" the Baud rate - if it is off by a certain factor knowing it will help you identify why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 14:40:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727960#M44514</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-05-08T14:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0 FRDM K82F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727961#M44515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Changing oversampling ratio solved the baudrate problem.&amp;nbsp; How oversampling affects TX side?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:36:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-FRDM-K82F/m-p/727961#M44515</guid>
      <dc:creator>akimata</dc:creator>
      <dc:date>2018-07-18T13:36:24Z</dc:date>
    </item>
  </channel>
</rss>

