<?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>LPC MicrocontrollersのトピックRe: Baud Rate Issue LPC1857</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Baud-Rate-Issue-LPC1857/m-p/1572644#M51059</link>
    <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/162807"&gt;@rubensjunior&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please try to deinitialize the UART before changing the baudrate using Chip_UART_Deinit( )?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;After the baudrate change, please re-initialize the module with Chip_UART_Init( ).&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Regards, Raul.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2022 16:33:37 GMT</pubDate>
    <dc:creator>RaRo</dc:creator>
    <dc:date>2022-12-20T16:33:37Z</dc:date>
    <item>
      <title>Baud Rate Issue LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Baud-Rate-Issue-LPC1857/m-p/1571319#M51043</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear colleagues,&lt;BR /&gt;I'm having trouble making a baud rate setting. I use communication with a UART at 115200 bps, but when I need to change the baud rate for another one, my code doesn't work.&amp;nbsp;I can set the baudrate value only once, then I must restart the microcontroller to be able to change the baud rate. But I need to change the baud rate while running the firmware.&lt;BR /&gt;I really appreciate the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chip_UART_SetBaud(LPC_UART1, baudrate);&lt;/P&gt;&lt;P&gt;/* Determines and sets best dividers to get a target bit rate */&lt;BR /&gt;uint32_t Chip_UART_SetBaud(LPC_USART_T *pUART, uint32_t baudrate)&lt;BR /&gt;{&lt;BR /&gt;uint32_t div, divh, divl, clkin;&lt;/P&gt;&lt;P&gt;/* Determine UART clock in rate without FDR */&lt;BR /&gt;clkin = Chip_Clock_GetRate(UART_BClock[Chip_UART_GetIndex(pUART)]);&lt;BR /&gt;div = clkin / (baudrate * 16);&lt;/P&gt;&lt;P&gt;/* High and low halves of the divider */&lt;BR /&gt;divh = div / 256;&lt;BR /&gt;divl = div - (divh * 256);&lt;/P&gt;&lt;P&gt;Chip_UART_EnableDivisorAccess(pUART);&lt;BR /&gt;Chip_UART_SetDivisorLatches(pUART, divl, divh);&lt;BR /&gt;Chip_UART_DisableDivisorAccess(pUART);&lt;/P&gt;&lt;P&gt;/* Fractional FDR alreadt setup for 1 in UART init */&lt;/P&gt;&lt;P&gt;return clkin / div;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/forums/postpage/choose-node/true/board-id/lpc#" target="_blank" rel="noopener"&gt;LPC18xx&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 17:03:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Baud-Rate-Issue-LPC1857/m-p/1571319#M51043</guid>
      <dc:creator>rubensjunior</dc:creator>
      <dc:date>2022-12-16T17:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Baud Rate Issue LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Baud-Rate-Issue-LPC1857/m-p/1572644#M51059</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/162807"&gt;@rubensjunior&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please try to deinitialize the UART before changing the baudrate using Chip_UART_Deinit( )?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;After the baudrate change, please re-initialize the module with Chip_UART_Init( ).&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Regards, Raul.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:33:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Baud-Rate-Issue-LPC1857/m-p/1572644#M51059</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2022-12-20T16:33:37Z</dc:date>
    </item>
  </channel>
</rss>

