<?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: MKE04 bus clock &amp; UART speed</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE04-bus-clock-UART-speed/m-p/625276#M37476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured out the problem... need to set DIV2 to set the bus clock as system clock / 2 (answer C in my first post).&lt;/P&gt;&lt;P&gt;In the block diagram DIV2 refers to the DIV2 configuration bit, not divide by 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Apr 2017 21:07:11 GMT</pubDate>
    <dc:creator>nickkelsey</dc:creator>
    <dc:date>2017-04-19T21:07:11Z</dc:date>
    <item>
      <title>MKE04 bus clock &amp; UART speed</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE04-bus-clock-UART-speed/m-p/625275#M37475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The MKE04 UART baud rate seems to be exactly twice has fast as it should be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System clock is 48MHz (internal clock source, BDIV set to 0 in startup code, otherwise default).&lt;/P&gt;&lt;P&gt;The UART is clocked by the Bus Clock according to the documentation.&lt;/P&gt;&lt;P&gt;Bus clock is assumed to be 24MHz as the documentation states it is System Clock / 2, max 24MHz.&lt;/P&gt;&lt;P&gt;UART baud rate modulo divisor (SBR aka BR) is set to 13.&lt;/P&gt;&lt;P&gt;24Mhz / 16 / 13 = ~115200bps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sending repeated 0x00 results in a low period of 39.0us and a high period of 4.4us.&lt;/P&gt;&lt;P&gt;low period = 1 start bit + 8 data bits = 9 bits, 39.0us / 9 = 4.333us&lt;/P&gt;&lt;P&gt;4.333us = 230769bps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working in reverse: The documentation on the SBR (aka BR) register states the UART baud rate equals BUSCLK/(16xBR).&lt;/P&gt;&lt;P&gt;so 230769kbps = BUSCLK/(16x13) therefore we can calculate BUSCLK = 48,000,000 = 48MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something is out be a factor of 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spitballing possible causes:&lt;/P&gt;&lt;P&gt;A) UART setting isn't Bus Clock / 16 but Bus Clock / 8 (unlikely as UARTs are typically 16x oversampled).&lt;/P&gt;&lt;P&gt;B) UART is clocked from the System Clock, not the Bus Clock (documentation would have to be wrong in lots of places).&lt;/P&gt;&lt;P&gt;C) The Bus Clock really is operating at 48MHz, same as the System Clock (not div 2).&lt;/P&gt;&lt;P&gt;D) The Bus Clock really is operating at 48MHz and the System Clock is somehow operating at 96MHz. This is unlikely as a GPIO toggle with NOP delays suggests the core is operating at 48MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the 16-pin version of the part so there is no BUSOUT pin to verify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking for assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:31:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE04-bus-clock-UART-speed/m-p/625275#M37475</guid>
      <dc:creator>nickkelsey</dc:creator>
      <dc:date>2017-04-19T19:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: MKE04 bus clock &amp; UART speed</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE04-bus-clock-UART-speed/m-p/625276#M37476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured out the problem... need to set DIV2 to set the bus clock as system clock / 2 (answer C in my first post).&lt;/P&gt;&lt;P&gt;In the block diagram DIV2 refers to the DIV2 configuration bit, not divide by 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 21:07:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE04-bus-clock-UART-speed/m-p/625276#M37476</guid>
      <dc:creator>nickkelsey</dc:creator>
      <dc:date>2017-04-19T21:07:11Z</dc:date>
    </item>
  </channel>
</rss>

