<?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: uart baud rate ?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/uart-baud-rate/m-p/957507#M37982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, it is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;All three USARTs use a common peripheral clock (U_PCLK) and, if needed, a fractional baud rate generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In asynchronous mode, it is necessary to configure the baud rate divider BRGVAL in the USARTn BRG register and the serial clock is Un_SCLK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82453i5475D53CCBF3E495/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the SDK, this funtion initializes the USART configuration&amp;nbsp;&lt;SPAN&gt;structure to a default value. The default&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;values are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; * usartConfig-&amp;gt;baudRate_Bps = 9600U;&lt;BR /&gt; * usartConfig-&amp;gt;parityMode = kUSART_ParityDisabled;&lt;BR /&gt; * usartConfig-&amp;gt;stopBitCount = kUSART_OneStopBit;&lt;BR /&gt; * usartConfig-&amp;gt;bitCountPerChar = kUSART_8BitsPerChar;&lt;BR /&gt; * usartConfig-&amp;gt;loopback = false;&lt;BR /&gt; * usartConfig-&amp;gt;enableTx = false;&lt;BR /&gt; * usartConfig-&amp;gt;enableRx = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void USART_GetDefaultConfig(usart_config_t *config)&lt;BR /&gt;{&lt;BR /&gt; /* Check arguments */&lt;BR /&gt; assert(NULL != config);&lt;/P&gt;&lt;P&gt;/* Initializes the configure structure to zero. */&lt;BR /&gt; memset(config, 0, sizeof(*config));&lt;/P&gt;&lt;P&gt;/* Set always all members ! */&lt;BR /&gt; config-&amp;gt;baudRate_Bps = 9600U;&lt;BR /&gt; config-&amp;gt;parityMode = kUSART_ParityDisabled;&lt;BR /&gt; config-&amp;gt;stopBitCount = kUSART_OneStopBit;&lt;BR /&gt; config-&amp;gt;bitCountPerChar = kUSART_8BitsPerChar;&lt;BR /&gt; config-&amp;gt;loopback = false;&lt;BR /&gt; config-&amp;gt;enableRx = false;&lt;BR /&gt; config-&amp;gt;enableTx = false;&lt;BR /&gt; config-&amp;gt;syncMode = kUSART_SyncModeDisabled;&lt;BR /&gt; config-&amp;gt;enableContinuousSCLK = false;&lt;BR /&gt; config-&amp;gt;clockPolarity = kUSART_RxSampleOnFallingEdge;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can modify it according to your needs, for example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USART_GetDefaultConfig(&amp;amp;config);&lt;BR /&gt; config.enableRx = true;&lt;BR /&gt; config.enableTx = true;&lt;BR /&gt; config.baudRate_Bps = 115200;&lt;/P&gt;&lt;P&gt;/* Initialize the USART with configuration. */&lt;BR /&gt; USART_Init(USART1, &amp;amp;config, EXAMPLE_USART_CLK_FREQ);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2019 15:26:43 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2019-07-23T15:26:43Z</dc:date>
    <item>
      <title>uart baud rate ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/uart-baud-rate/m-p/957506#M37981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in my Lpc824 have 3 uart protocol&amp;nbsp; &amp;nbsp;. can i use the uart0 in 9600 baud rate and the uart1 as 115200 , if it is possible to use different baud rates in single code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Aravind P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 12:54:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/uart-baud-rate/m-p/957506#M37981</guid>
      <dc:creator>aravindpb5009</dc:creator>
      <dc:date>2019-07-23T12:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: uart baud rate ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/uart-baud-rate/m-p/957507#M37982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, it is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;All three USARTs use a common peripheral clock (U_PCLK) and, if needed, a fractional baud rate generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In asynchronous mode, it is necessary to configure the baud rate divider BRGVAL in the USARTn BRG register and the serial clock is Un_SCLK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82453i5475D53CCBF3E495/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the SDK, this funtion initializes the USART configuration&amp;nbsp;&lt;SPAN&gt;structure to a default value. The default&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;values are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; * usartConfig-&amp;gt;baudRate_Bps = 9600U;&lt;BR /&gt; * usartConfig-&amp;gt;parityMode = kUSART_ParityDisabled;&lt;BR /&gt; * usartConfig-&amp;gt;stopBitCount = kUSART_OneStopBit;&lt;BR /&gt; * usartConfig-&amp;gt;bitCountPerChar = kUSART_8BitsPerChar;&lt;BR /&gt; * usartConfig-&amp;gt;loopback = false;&lt;BR /&gt; * usartConfig-&amp;gt;enableTx = false;&lt;BR /&gt; * usartConfig-&amp;gt;enableRx = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void USART_GetDefaultConfig(usart_config_t *config)&lt;BR /&gt;{&lt;BR /&gt; /* Check arguments */&lt;BR /&gt; assert(NULL != config);&lt;/P&gt;&lt;P&gt;/* Initializes the configure structure to zero. */&lt;BR /&gt; memset(config, 0, sizeof(*config));&lt;/P&gt;&lt;P&gt;/* Set always all members ! */&lt;BR /&gt; config-&amp;gt;baudRate_Bps = 9600U;&lt;BR /&gt; config-&amp;gt;parityMode = kUSART_ParityDisabled;&lt;BR /&gt; config-&amp;gt;stopBitCount = kUSART_OneStopBit;&lt;BR /&gt; config-&amp;gt;bitCountPerChar = kUSART_8BitsPerChar;&lt;BR /&gt; config-&amp;gt;loopback = false;&lt;BR /&gt; config-&amp;gt;enableRx = false;&lt;BR /&gt; config-&amp;gt;enableTx = false;&lt;BR /&gt; config-&amp;gt;syncMode = kUSART_SyncModeDisabled;&lt;BR /&gt; config-&amp;gt;enableContinuousSCLK = false;&lt;BR /&gt; config-&amp;gt;clockPolarity = kUSART_RxSampleOnFallingEdge;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can modify it according to your needs, for example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USART_GetDefaultConfig(&amp;amp;config);&lt;BR /&gt; config.enableRx = true;&lt;BR /&gt; config.enableTx = true;&lt;BR /&gt; config.baudRate_Bps = 115200;&lt;/P&gt;&lt;P&gt;/* Initialize the USART with configuration. */&lt;BR /&gt; USART_Init(USART1, &amp;amp;config, EXAMPLE_USART_CLK_FREQ);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:26:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/uart-baud-rate/m-p/957507#M37982</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2019-07-23T15:26:43Z</dc:date>
    </item>
  </channel>
</rss>

