<?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のトピックHard Fault during UART2 initialization</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576120#M22613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JGold on Tue Sep 07 08:42:28 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running the RDB1768cmsis_UART example on my board, and the initialization of UART0 works fine, but when I change the code to initialize UART2, it causes a hard fault after this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=2][SIZE=2]C Code:[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]LPC_UART2-&amp;gt;LCR[/SIZE][SIZE=2] = 0x83; [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// 8 bits, no Parity, 1 Stop bit, DLAB=1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]Debugger Assembly:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x000003ac &amp;lt;UART0_Init+164&amp;gt;: strb r2, [r3, #12][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=3]I have no problems with UART0 and 1, but keep having Hard Faultys with UART2 and 3.[/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=3]Thoughts?[/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:55:47 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:55:47Z</dc:date>
    <item>
      <title>Hard Fault during UART2 initialization</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576120#M22613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JGold on Tue Sep 07 08:42:28 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running the RDB1768cmsis_UART example on my board, and the initialization of UART0 works fine, but when I change the code to initialize UART2, it causes a hard fault after this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=2][SIZE=2]C Code:[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]LPC_UART2-&amp;gt;LCR[/SIZE][SIZE=2] = 0x83; [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// 8 bits, no Parity, 1 Stop bit, DLAB=1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]Debugger Assembly:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x000003ac &amp;lt;UART0_Init+164&amp;gt;: strb r2, [r3, #12][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=3]I have no problems with UART0 and 1, but keep having Hard Faultys with UART2 and 3.[/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT][SIZE=3]Thoughts?[/SIZE][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:55:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576120#M22613</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault during UART2 initialization</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576121#M22614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Sep 07 09:20:38 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you turned the power on for UART2/3 in the PCONP (Power Control for Peripherals) register. According to the LPC17 user manual, UART0/1 default to being powered on, but 2/3 don't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:55:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576121#M22614</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault during UART2 initialization</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576122#M22615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Sep 07 09:52:29 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;Have you turned the power on for UART2/3 in the PCONP (Power Control for Peripherals) register. According to the LPC17 user manual, UART0/1 default to being powered on, but 2/3 don't.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And just in case, here is some (untested) code that should do this. Add this near the start of main(), and before you try to access the UARTs...&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;#define PCUART0_POWERON (1 &amp;lt;&amp;lt; 3)
#define PCUART1_POWERON (1 &amp;lt;&amp;lt; 4)
#define PCUART2_POWERON (1 &amp;lt;&amp;lt; 24)
#define PCUART3_POWERON (1 &amp;lt;&amp;lt; 25)

// Turn on power to UART2 and UART3
// (UART0 and UART1 on by default)
LPC_SC-&amp;gt;PCONP |=&amp;nbsp; PCUART2_POWERON | PCUART3_POWERON;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576122#M22615</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault during UART2 initialization</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576123#M22616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JGold on Tue Sep 07 10:10:07 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=5]DOH!!![/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had code to turn it on, but but for some reason it failed to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:55:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Hard-Fault-during-UART2-initialization/m-p/576123#M22616</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:55:51Z</dc:date>
    </item>
  </channel>
</rss>

