<?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>topic Re: HardFault Interrupt in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493804#M30583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most hard faults when accessing peripherals are due to the fact that the clock to the peripheral has not been enabled.&lt;/P&gt;&lt;P&gt;Check that the UART's clock is gated in the corresponding SIM_SCGCx register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Mar 2016 13:08:46 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2016-03-21T13:08:46Z</dc:date>
    <item>
      <title>HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493803#M30582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hello! I&amp;nbsp; use FRDM-K64F board. &lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;An interrupt "HardFault_IRQn" occurs when used uart. &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;How to understand, because of what &lt;SPAN&gt;occurs&lt;/SPAN&gt; &lt;SPAN&gt;this interrupt and fix error?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 12:21:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493803#M30582</guid>
      <dc:creator>maksim_lipskiy</dc:creator>
      <dc:date>2016-03-21T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493804#M30583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most hard faults when accessing peripherals are due to the fact that the clock to the peripheral has not been enabled.&lt;/P&gt;&lt;P&gt;Check that the UART's clock is gated in the corresponding SIM_SCGCx register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:08:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493804#M30583</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-03-21T13:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493805#M30584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Mark!&lt;BR /&gt;I check SIM_SCGC1 register (because i'm use UART4) in&amp;nbsp; HardFault handler.&amp;nbsp; &lt;BR /&gt;UART4 Clock Enable&amp;nbsp; SIM_SCGC1 = 0x00000400;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493805#M30584</guid>
      <dc:creator>maksim_lipskiy</dc:creator>
      <dc:date>2016-03-21T14:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493806#M30585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means that the UART4 is being clocked and the hard fault must be due to another reason than a UART peripheral access.&lt;/P&gt;&lt;P&gt;I find the following easily identifies such problems:&lt;/P&gt;&lt;P&gt;1. Use a hard fault handler that doesn't do anything - just returns&lt;/P&gt;&lt;P&gt;2. Set a break point in the hard fault handler (or with disabled watchdog just pause the debugger when it is firing).&lt;/P&gt;&lt;P&gt;3. Using disassemble mode, single step out of the hard fault handler. This will return to the instruction that causes the fault and if you step further it will repeat the error and go back into the fault handler.&lt;BR /&gt;Usually it is obvîous what is wrong when the bad instruction is seen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For FRDM-K64F see: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K64F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K64F.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 15:01:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493806#M30585</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-03-21T15:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493807#M30586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a hard-fault handler that gives details to you about the event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 00:38:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493807#M30586</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-03-22T00:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493808#M30587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN&gt;Now&lt;/SPAN&gt; &lt;SPAN&gt;I will test&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 07:52:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493808#M30587</guid>
      <dc:creator>maksim_lipskiy</dc:creator>
      <dc:date>2016-03-22T07:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493809#M30588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;that's what happened&lt;/SPAN&gt; &lt;SPAN&gt;to step&lt;/SPAN&gt; &lt;SPAN&gt;out of the&lt;/SPAN&gt; Hardfault interrupt &lt;SPAN&gt;handler: &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hardfault_debug.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23588i1D69E0D619BACA0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hardfault_debug.jpg" alt="hardfault_debug.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 08:40:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493809#M30588</guid>
      <dc:creator>maksim_lipskiy</dc:creator>
      <dc:date>2016-03-22T08:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493810#M30589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If this is accurate, it is showing that the hard fault is due to your code trying to run in the memory area 0x79aff020, which is invalid. Why the code is trying to run from there will be due to a problem such as using a bad pointer to jump to, trying to handle an interrupt which has an invalid/random interrupt vector or returnîng from a sub-routine where the stack has been corrupted (and the return address overwritten with random data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to study your code to work out where the failure start from (if the error is consistent you can simply step through the normal operation until it fails) or use proven code to save needing to do such excercises.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 12:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493810#M30589</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-03-22T12:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493811#M30590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maksim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer the method in &lt;A href="http://mcuoneclipse.com/2015/07/05/debugging-arm-cortex-m-hard-faults-with-gdb-custom-command/"&gt;Debugging ARM Cortex-M Hard Faults with GDB Custom Command&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Hope that help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 03:05:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493811#M30590</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2016-03-23T03:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault Interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493812#M30591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="g-unit"&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;Thank you very much for your answer. I&lt;BR /&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;I set&lt;/SPAN&gt; &lt;SPAN&gt;a slight delay&lt;/SPAN&gt; &lt;SPAN&gt;after the function&lt;/SPAN&gt; sending data for UART and&amp;nbsp; &lt;SPAN lang="en"&gt;hardfault inerrupt &lt;SPAN&gt;ceased !!!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 06:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/HardFault-Interrupt/m-p/493812#M30591</guid>
      <dc:creator>maksim_lipskiy</dc:creator>
      <dc:date>2016-03-23T06:30:21Z</dc:date>
    </item>
  </channel>
</rss>

