<?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: LPC812 UART Baud Rate Issue (faster than expected) in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531076#M2311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vijay_nav on Thu Dec 26 22:57:45 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hai &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am working on LPC-812 board and i had worked with some example in the lpcxpresso tool.while working with the blinky example it works fine but i need fading in and fading out led for the blinky.I am not able to do that can any help me how to do that fading in and fading out the led.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:37:41 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:37:41Z</dc:date>
    <item>
      <title>LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531071#M2306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mvinger on Sat Jun 22 20:14:34 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a weirdness and searched all the docs to discover what my error might be. I used a board to board UART channel setup at 115200 and all seemed to work fine. I then went to hook-up a separate UART receiver-only for some simple IR remote stuff (someone else's remote). It only sends two bytes in N81 at 300 bps. The RX-only channel would not work. Then I noticed an elongated data pattern from what I got to what was sent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I hooked up the logic analyzer and verified the 300bps on the RX-only channel and the data was as expected. I then halved the baudrate setting sent to initialize the channel and wala (however you spell it), I could read the data appropriately.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I then checked my 115200bps full-duplex UART channel and it was running at 250kbps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone have a clue as to if there is an error in the docs or am I missing something else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPC812 is configured to run at the max 30MHz from the internal osc as the base. The UART div is set to 1 so the PLL clock should match the 30MHz system clock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Perplexed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MTV2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531071#M2306</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531072#M2307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by noahk on Sat Jun 22 23:49:41 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi MTV2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How are you configuring UARTCLKDIV? UARTFRGDIV/MULT? and BRG? If you are configuring the PLL to drive in 30 MHz, and you are using a UARTCLKDIV of 1. These values should provide you with a 115200 baud rate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming 30 MHz into the FRG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;UARTFRGDIV=255 (+1=256)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UARTFRGMULT=91&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BRG=11 (+1=12)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;30000000 / (1 + 91/256) = 22132564 (See section 4.6.18 USART fractional generator divider value register)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22132564 / 12 = 1844380 (Divide by BRG)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1843575 / 16 = 115273 (Divide by oversample rate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Noah&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531072#M2307</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531073#M2308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mvinger on Sun Jun 23 09:58:30 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Noah.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the lp800_driver_lib and the CMSIS_CORE_LPC8xx.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemInit is initializing the PLL using the 12MHz IRC as an input and MSEL = 4 (M=5) and PSEL = 1 (P=2) which produces a 12MHz * 5*(2*2) = 240MHz FCCO clock and the PLL output clock is 240MHz/(2*2) = 60MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SYSAHBCLKDIV register is set to 2. Thus the system clock is 60MHz/2 = 30MHz. The SystemCoreClockUpdate confirms this with SystemCoreClock = 60,000,000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UARTInit/UARTClock_Init set UARTCLKDIV to 1 and UARTSysClk is calculated at 30,000,000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BRG is then set at 15 (divide UARTSysClk by 16).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UARTFRGMULT is then set for 4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The UARTInit function does not get as close to 115200 as you have (I may tweak it now that I see its inefficiency) but it gets to 115384.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Still, all of my input and output baudrates are actually doubled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MTV2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531073#M2308</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531074#M2309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by noahk on Sun Jun 23 10:22:04 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi MTV2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I see the problem. The SYSAHBCLKDIV drives the system clock, but the FRG gets the clock from the main clock. The main clock is 60 mhz. The system clock is 30 mhz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you are getting is&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;60000000 / (1 + 4/256) = 59076923&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;59076923 / 16 = 3692307&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3692307 / 16 = 230769&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Noah&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531074#M2309</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531075#M2310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mvinger on Sun Jun 23 10:28:15 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I missed that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Assumptions and semantics can be a killer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your help has been much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This means that the LPC800_driver_lib has made incorrect assumptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will make notes and corrections.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Take care.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MTV2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531075#M2310</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPC812 UART Baud Rate Issue (faster than expected)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531076#M2311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vijay_nav on Thu Dec 26 22:57:45 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hai &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am working on LPC-812 board and i had worked with some example in the lpcxpresso tool.while working with the blinky example it works fine but i need fading in and fading out led for the blinky.I am not able to do that can any help me how to do that fading in and fading out the led.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC812-UART-Baud-Rate-Issue-faster-than-expected/m-p/531076#M2311</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:41Z</dc:date>
    </item>
  </channel>
</rss>

