<?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中的主题 Re: LPC1788 DAC Generates a HardFault Exception</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553414#M12765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Mon Oct 03 12:46:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: kralux&lt;/STRONG&gt;&lt;BR /&gt;0x10 is identical to (2&amp;lt;&amp;lt;0).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In which world :confused::confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you familiar with hex and bin values?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:29:34 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:29:34Z</dc:date>
    <item>
      <title>LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553409#M12760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kralux on Sat Oct 01 23:54:27 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is an issue that arises with the LPC1788.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code snippet generates a hard fault exception which makes no sense at all:&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;LPC_IOCON-&amp;gt;P0_26 = 0x10 + (1 &amp;lt;&amp;lt; 16); // DAC_OUT Enabled - Powers up that circuit as well
LPC_DAC-&amp;gt;CR = (620 &amp;lt;&amp;lt; 6) | DAC_LOW_BIAS_CURRENT; // set to 2V and slow update
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first line simply powers up the DAC by enabling the DAC_OUT pin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The second line puts a value in the CR of the DAC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This second line is the one that generates the hard fault exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It makes no sense. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have verified the addresses are all correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The powering up of the various blocks is as such:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define PCONP_Val&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40C09A27&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which should be amply sufficient.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that in the Red Code Suite under peripherals, the DAC is still grayed out which seems to indicate it is not powered up. However, per the user manual it should be (see page 753 of UM10470 rev1.5).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know your experience with the DAC and whether this is a bug of the chip itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553409#M12760</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553410#M12761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sergio on Sun Oct 02 09:16:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me suggest one thing, dont you forget to clock DAC ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553410#M12761</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553411#M12762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kralux on Sun Oct 02 15:59:17 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: sergio&lt;/STRONG&gt;&lt;BR /&gt;Let me suggest one thing, dont you forget to clock DAC ?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The clock is enabled because the DAC operates from the common PCLK that clocks both the bus interface and functional portion of most APB peripherals.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So there is no separate DAC clock control. It is the same for most peripherals and it is already on (LPC_SC-&amp;gt;PCLKSEL = 1).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553411#M12762</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553412#M12763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Oct 02 19:48:00 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: sergio&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;LPC_IOCON-&amp;gt;P0_26 = 0x10 + (1 &amp;lt;&amp;lt; 16); // DAC_OUT Enabled - Powers up that circuit as well&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which function is 0x10 :confused::confused: Perhaps function 2 could help &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&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;
LPC_IOCON-&amp;gt;P0_26 =&amp;nbsp; (2&amp;lt;&amp;lt;0) | (1 &amp;lt;&amp;lt; 16); // DAC_OUT Enabled - Powers up&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553412#M12763</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553413#M12764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kralux on Mon Oct 03 12:41:30 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;Which function is 0x10 :confused::confused: Perhaps function 2 could help &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&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;
LPC_IOCON-&amp;gt;P0_26 =&amp;nbsp; (2&amp;lt;&amp;lt;0) | (1 &amp;lt;&amp;lt; 16); // DAC_OUT Enabled - Powers up&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"0x" means it is a hex number.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x10 is identical to (2&amp;lt;&amp;lt;0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is definitely not the source of the issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553413#M12764</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553414#M12765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Mon Oct 03 12:46:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: kralux&lt;/STRONG&gt;&lt;BR /&gt;0x10 is identical to (2&amp;lt;&amp;lt;0).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In which world :confused::confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you familiar with hex and bin values?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553414#M12765</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1788 DAC Generates a HardFault Exception</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553415#M12766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kralux on Mon Oct 03 12:54:25 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are 100% correct. I am in sleep deprived mode :confused: and I take back what I said that was so stupid... sorry about that...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That was the main source of my problems. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Issue is now fixed. Thank you Zero!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:29:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1788-DAC-Generates-a-HardFault-Exception/m-p/553415#M12766</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:29:35Z</dc:date>
    </item>
  </channel>
</rss>

