<?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: HardFault_Handler from FreeRTOS - why?</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537079#M5385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Mon Jul 30 01:14:19 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are almost certainly overflowing your stack, causing it to overwrite some other data some other data in you system.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:43:29 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:43:29Z</dc:date>
    <item>
      <title>HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537076#M5382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dpa on Sat Jul 28 11:41:05 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi LPC Fans,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've modified the freertos project in the NXP demos for LPC11xx. A task blinks an led if the value of a variable is !0. The variable value is toggled if we can take a binary semaphore that is given by an interrupt handler invoked by a button connected to a GPIO port. It all seems to work as expected, unless I press the button quickly, repeatedly, and then I end up in the HardFault_Handler. I'm new to the Cortex in general (I know the previous ARM arches) and M0 in particular. How do I debug this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537076#M5382</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537077#M5383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by OXO on Mon Jul 30 00:13:14 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Post your code. It's impossible to help without seeing it..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537077#M5383</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537078#M5384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by&amp;nbsp; on Mon Jul 30 00:46:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the following page on debugging hard faults on M3/4, although I'm not sure how much is consistent with the M0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you think your issue might be related to your use of the RTOS then there is also the following page for a start:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.freertos.org/FAQHelp.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537078#M5384</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537079#M5385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Mon Jul 30 01:14:19 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are almost certainly overflowing your stack, causing it to overwrite some other data some other data in you system.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537079#M5385</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537080#M5386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Superfred on Mon Jul 30 09:10:37 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi dpa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had a similar problem: RTOS hangs up during interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe my solution works also for you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After long research I found out that you have to change the interrupt priority for the GPIO interrupt (in fact for all used interrupts), see &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.freertos.org/a00110.html&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;section[FONT=Arial] [I][SIZE=2]configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY[/SIZE][/I][/FONT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After I set the priority for GPIO with the command&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;NVIC_SetPriority( EINT3_IRQn, 27);&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;before starting the RTOS, everything works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fred&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537080#M5386</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537081#M5387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frame on Tue Jul 31 04:46:48 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;To get closer, one can catch the failing code --in-- the hardfault routine, and check&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the contents of some system registers that contain the reason for the hardfault.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also some example code by joseph yiu around ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done it once, but details like core register names and so are flushed down the memory hole - sorry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537081#M5387</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537082#M5388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Tue Jul 31 05:29:23 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Debugging a Hard Fault:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/DebugHardFault&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537082#M5388</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537083#M5389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dpa on Fri Aug 03 12:19:20 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;for all the replies. I found that by repeatedly pressing the button (which generates a lot of interrupts, due to the lack of de-bounce circuitry [I didn't make it ;-)]) was causing the isr to overrun the bounds of the stack. Thanks to TheFallGuy in particular, and apologies for not looking there first...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537083#M5389</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault_Handler from FreeRTOS - why?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537084#M5390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dpa on Fri Aug 03 15:18:00 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks superfred, you prompted me to find this (FreeRTOS &amp;amp; Context interrupts - I think it's relevant to the M0 also):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.freertos.org/RTOS-Cortex-M3-M4.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:43:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/HardFault-Handler-from-FreeRTOS-why/m-p/537084#M5390</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:43:32Z</dc:date>
    </item>
  </channel>
</rss>

