<?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: LPC 546 USART CONFIG USING REGISTER</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460768#M48833</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt; i want to do register level programing using LPC546 to interface usart, anyone could help me.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is fine.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;But don't use magic numbers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This forces others to read your code and the MCU manual in parallel, and crosscheck all your registers, bits, and shifts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many posters her like me are volunteers, and neither have the time nor the desire to do that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead use the defines that come with the MCU-specific header in the SDK.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For example, in &lt;FONT face="courier new,courier"&gt;LPC54628.h&lt;/FONT&gt;. That makes reading much easier.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 09:31:03 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2022-05-19T09:31:03Z</dc:date>
    <item>
      <title>LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460678#M48827</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to do register level programing using LPC546 to interface usart, anyone could help me.&lt;/P&gt;&lt;P&gt;This is my configuration for usart0 in LPC546 for polling mode:-&lt;/P&gt;&lt;P&gt;USART0-&amp;gt;CFG |= (1UL &amp;lt;&amp;lt; 0); // USART ENABLE&lt;BR /&gt;USART0-&amp;gt;BRG = 115200U; // SET BAUDRATE&lt;BR /&gt;USART0-&amp;gt;CFG = 0x0U; // NO PARITY&lt;BR /&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1UL &amp;lt;&amp;lt; 6); // 1 STOP BIT&lt;BR /&gt;USART0-&amp;gt;CFG = 0x1U; // 8 BIT DATA LENGTH&lt;/P&gt;&lt;P&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1UL &amp;lt;&amp;lt; 11); // ASYNC MODE&lt;BR /&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1UL &amp;lt;&amp;lt; 12); // FALLING EDGE*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But its not working, please suggest id anyone known this thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 07:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460678#M48827</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-05-19T07:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460768#M48833</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; i want to do register level programing using LPC546 to interface usart, anyone could help me.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is fine.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;But don't use magic numbers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This forces others to read your code and the MCU manual in parallel, and crosscheck all your registers, bits, and shifts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many posters her like me are volunteers, and neither have the time nor the desire to do that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead use the defines that come with the MCU-specific header in the SDK.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For example, in &lt;FONT face="courier new,courier"&gt;LPC54628.h&lt;/FONT&gt;. That makes reading much easier.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 09:31:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460768#M48833</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-05-19T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460874#M48836</link>
      <description>&lt;P&gt;i have checked all bits but not finding error from my side,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 11:59:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460874#M48836</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-05-19T11:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460905#M48838</link>
      <description>&lt;P&gt;Did you think of enabling power and clock for the USART peripheral block ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:47:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1460905#M48838</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-05-19T12:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465506#M48946</link>
      <description>&lt;P&gt;I have POWER ON&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYSCON-&amp;gt;PDRUNCFG[0] |= (1 &amp;lt;&amp;lt; 4)&lt;/P&gt;&lt;P&gt;AND I did not find clock for USART pheripheral block in user mannual, Please help me to creak this&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 10:39:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465506#M48946</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-05-27T10:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465926#M48956</link>
      <description>&lt;P&gt;If your USART is from FlexComm0, you need to make sure there is clock attaching to FlexComm0.&lt;/P&gt;&lt;P&gt;Please check USART demo code, CLOCK_AttachClk&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 03:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465926#M48956</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-05-30T03:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465953#M48957</link>
      <description>&lt;P&gt;SYSCON-&amp;gt;AHBCLKCTRL[1] |= (1UL &amp;lt;&amp;lt; 11); // FLEXCOMM0 CLOCK ENABLE&lt;BR /&gt;SYSCON-&amp;gt;FCLKSEL[0] = 0x4U;&lt;BR /&gt;SYSCON-&amp;gt;FRGCTRL = 0x01;&lt;/P&gt;&lt;P&gt;void USART_0_INIT(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;USART0-&amp;gt;CFG |= (1 &amp;lt;&amp;lt; 0); // USART ENABLE&lt;BR /&gt;USART0-&amp;gt;BRG = 0x67; // SET BAUD RATE&lt;BR /&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1 &amp;lt;&amp;lt; 6); // 1 STOP BIT&lt;BR /&gt;USART0-&amp;gt;CFG |= (1 &amp;lt;&amp;lt; 2); // 8 BIT MODE&lt;BR /&gt;USART0-&amp;gt;FIFOCFG |= (1 &amp;lt;&amp;lt; 16) | (1 &amp;lt;&amp;lt; 0); // ENABLE TX&lt;BR /&gt;USART0-&amp;gt;FIFOCFG |= (1 &amp;lt;&amp;lt; 17) | (1 &amp;lt;&amp;lt; 1); // ENABLE RX&lt;BR /&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1 &amp;lt;&amp;lt; 11); // ASYNC MODE&lt;BR /&gt;USART0-&amp;gt;CFG &amp;amp;=~ (1 &amp;lt;&amp;lt; 12); // FALLING EDGE&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 05:09:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465953#M48957</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-05-30T05:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465955#M48958</link>
      <description>&lt;P&gt;please check the code i have done the needful&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 05:10:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1465955#M48958</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-05-30T05:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1466050#M48961</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggest you testing usart_polling SDK demo as a standard on the board. thus we can know if HW environment is ok.&lt;/P&gt;
&lt;P&gt;If demo code works but your code can't,&amp;nbsp; make register comparison of demo and your code in debug code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 07:36:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1466050#M48961</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-05-30T07:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1467288#M48984</link>
      <description>&lt;P&gt;have you ever config USART on register level programing ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/13026"&gt;@ZhangJennie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 07:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1467288#M48984</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-06-01T07:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1467325#M48987</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; have you ever config USART on register level programing ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Easy solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Take the proposed SDK USART example, determine the sequence of initialisation steps either via static code analysis or debugging, and apply it to your code.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 08:24:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1467325#M48987</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-06-01T08:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1468517#M49022</link>
      <description>&lt;P&gt;please reply.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 04:39:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1468517#M49022</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-06-03T04:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1469255#M49042</link>
      <description>&lt;P&gt;LPC546 only has SDK demo as official demo code. and I didn't test on other code.&lt;/P&gt;
&lt;P&gt;If you don't use SDK, please follow the advice above, referring SDK usart demo, follow the usart initialization sequence and check the related register setting to config yours code.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 08:55:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1469255#M49042</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-06-06T08:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 546 USART CONFIG USING REGISTER</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1469695#M49055</link>
      <description>&lt;P&gt;i have done it now its working fine on register level.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 05:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-546-USART-CONFIG-USING-REGISTER/m-p/1469695#M49055</guid>
      <dc:creator>k_sunilgupta</dc:creator>
      <dc:date>2022-06-07T05:00:49Z</dc:date>
    </item>
  </channel>
</rss>

