<?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中的主题 UART Clock divider</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531704#M2632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Mon Jan 21 09:53:47 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;My system is running at 12Mhz, and to get 115200 baud I use the following code:&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;int dlEest = 4;
int mulVal = 8;
int ClockVal = 1;
int divAddVal = 5;

LPC_SYSCON-&amp;gt;UARTCLKDIV = ClockVal;

LPC_USART-&amp;gt;DLM = dlEest / 256;
LPC_USART-&amp;gt;DLL = dlEest % 256;
LPC_USART-&amp;gt;FDR = (mulVal&amp;lt;&amp;lt;4)|divAddVal;
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this works perfectly. Now to save power I want to make the clock divider higher. So I change ClockVal tot 4 and calculated that dlEest becomes 1. However UART stops functioning with that. What am Im doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 21:44:08 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T21:44:08Z</dc:date>
    <item>
      <title>UART Clock divider</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531704#M2632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Mon Jan 21 09:53:47 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;My system is running at 12Mhz, and to get 115200 baud I use the following code:&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;int dlEest = 4;
int mulVal = 8;
int ClockVal = 1;
int divAddVal = 5;

LPC_SYSCON-&amp;gt;UARTCLKDIV = ClockVal;

LPC_USART-&amp;gt;DLM = dlEest / 256;
LPC_USART-&amp;gt;DLL = dlEest % 256;
LPC_USART-&amp;gt;FDR = (mulVal&amp;lt;&amp;lt;4)|divAddVal;
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this works perfectly. Now to save power I want to make the clock divider higher. So I change ClockVal tot 4 and calculated that dlEest becomes 1. However UART stops functioning with that. What am Im doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:44:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531704#M2632</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: UART Clock divider</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531705#M2633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MikeSimmonds on Mon Jan 21 11:31:22 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Tahoma][SIZE=1]Since your clock into the Uart[/SIZE][/FONT][FONT=Tahoma][SIZE=1] is now effectivly 3MHz [12/4] you need&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;new numbers for DLM/DLL/FDR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UDLM [dec]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UDLL [dec]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DivAddVal [dec]&amp;nbsp;&amp;nbsp; 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MulVal [dec]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I got these numbers from an Excel sheet on the NXP site&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT][FONT=Tahoma][SIZE=1]&lt;/SPAN&gt;&lt;A href="http://"&gt;http://ics.nxp.com/support/documents/microcontrollers/xls/lpc2000.uart.baudrate.calculator.xls&lt;/A&gt;&lt;SPAN&gt;[/SIZE][/FONT][FONT=Tahoma][SIZE=1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It says LPC2000, but it is good for any MCU with the same uart type :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this will help you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT][FONT=Tahoma][SIZE=1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:44:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531705#M2633</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: UART Clock divider</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531706#M2634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Mon Jan 21 12:22:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Mike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That are exactly the same numbers I got when changing dllEst into 1 in the above example. But for some reason UART doesnt work anymore with those values. I recall that I read somewhere that the clock gets less accurate when using the CLKDIV divider, which would explain the problem. But maybe someone can confirm/debunk that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:44:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531706#M2634</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: UART Clock divider</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531707#M2635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MikeSimmonds on Mon Jan 21 15:45:40 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Tahoma][SIZE=1]Sorry, I missed the fact that the numbers were the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't say what device you are using, but I can tell that it is not the same as mine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you running on the internal RC oscillator, they are not always 100% accurate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a scope, and can you set (and enable the pin) for clk out to measure it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have to change other dividers (peripheral clock).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are just rambling as I am not familiar with non 1700 devices.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:44:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531707#M2635</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: UART Clock divider</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531708#M2636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Tue Jan 22 00:31:53 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: MikeSimmonds&lt;/STRONG&gt;&lt;BR /&gt;[FONT=Tahoma][SIZE=1]&lt;BR /&gt;You don't say what device you are using, but I can tell that it is not the same as mine.&lt;BR /&gt;[/SIZE][/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a LPC11U35, and aside for the difference that the UART register is called LPC_USART it's UART should be very similar to your LPC1768.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: MikeSimmonds&lt;/STRONG&gt;&lt;BR /&gt;[FONT=Tahoma][SIZE=1]&lt;BR /&gt;Are you running on the internal RC oscillator, they are not always 100% accurate.&lt;BR /&gt;[/SIZE][/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes. But its accuracy (1%) should be enough for UART, and as long as I dont use the clock divider, everything is fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: MikeSimmonds&lt;/STRONG&gt;&lt;BR /&gt;[FONT=Tahoma][SIZE=1]&lt;BR /&gt;Do you have to change other dividers (peripheral clock).&lt;BR /&gt;[/SIZE][/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the LPC11xx series dont have a dedicated peripheral clock. You can specify dividers for individual peripherals, but there is not global divider as far as I know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:44:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/UART-Clock-divider/m-p/531708#M2636</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:44:10Z</dc:date>
    </item>
  </channel>
</rss>

