<?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>LPCXpresso IDE中的主题 Re: LPC111x clocks</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553864#M12972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gerrit on Sun Feb 14 03:19:01 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi rkiryanov,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chapter 3.3 states:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SYSAHBCLKCTRL register gates the system clock to the various peripherals and memories. UART, the WDT, and SPI0/1 have individual clock dividers to derive peripheral clocks from the main clock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is also depicted in Fig 3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the answer is [B]main_clock / SSP0CLKDIV[/B]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:40:33 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:40:33Z</dc:date>
    <item>
      <title>LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553862#M12970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rkiryanov on Thu Feb 11 05:05:11 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;UM (11 January 2010), Fig 3. LPC111x CGU block diagram points that SPI0_PCLK is sourced directly from "main clock". Top right corner of this figure points that "AHB clocks 1 to 18 (memories and peripherals)" (I don't understand, how it can affect if peripherals are connected before this block). In PLC2xxx all peripheral clocks is sourced after CCLK and clocking directly from "main clock" is something new. What is correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553862#M12970</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553863#M12971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rkiryanov on Fri Feb 12 00:34:17 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words, what is SPI0_PCLK?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1: main_clock / SSP0CLKDIV&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2: main_clock / SYSAHBCLKDIV / SSP0CLKDIV&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553863#M12971</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553864#M12972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gerrit on Sun Feb 14 03:19:01 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi rkiryanov,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chapter 3.3 states:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SYSAHBCLKCTRL register gates the system clock to the various peripherals and memories. UART, the WDT, and SPI0/1 have individual clock dividers to derive peripheral clocks from the main clock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is also depicted in Fig 3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the answer is [B]main_clock / SSP0CLKDIV[/B]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553864#M12972</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553865#M12973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rkiryanov on Sun Feb 14 03:28:39 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Gerrit&lt;/STRONG&gt;&lt;BR /&gt;So the answer is [B]main_clock / SSP0CLKDIV[/B]Cheers&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, Gerrit!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look again to figure 3. What about UART_PCLK? Figure 3 says that it is also [B]main_clock / UARTCLKDIV[/B] and lets look to &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://ics.nxp.com/support/lpcxpresso/zip/lpc1114.examples.zip/uart/src/uart.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lines 171-173:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;&amp;nbsp; regVal = LPC_SYSCON-&amp;gt;UARTCLKDIV;

&amp;nbsp; Fdiv = (((SystemCoreClock/LPC_SYSCON-&amp;gt;SYSAHBCLKDIV)/regVal)/16)/baudrate ;/*baud rate */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it says that UART_PCLK is [B]main_clock / SYSAHBCLKDIV / UARTCLKDIV[/B]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cool, huh?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553865#M12973</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553866#M12974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rkiryanov on Thu Feb 18 02:16:19 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;up&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553866#M12974</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC111x clocks</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553867#M12975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_Europe on Tue Feb 23 01:03:44 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi rkiryanov&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like there have slipped a typo in the example code, it will be fixed in the next version. Sorry for that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The variable SystemCoreClock actually represents the AHB clock frequency not the actual system core clock frequency, see system_LPC11xx.c line 394. So to be able to calculate the right baudrate, the SystemCoreClock must be multiplied with the SYSAHBCLKDIV to have the main clock frequency again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it actually shoud be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
regVal = SYSCON-&amp;gt;UARTCLKDIV;
Fdiv = (((SystemCoreClock[COLOR=Red][B]*[/B][/COLOR]LPC_SYSCON-&amp;gt;SYSAHBCLKDIV)/regVal)/16)/baudrate ;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*baud rate */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;So the user manual is (as always) leading &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:40:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC111x-clocks/m-p/553867#M12975</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:40:35Z</dc:date>
    </item>
  </channel>
</rss>

