<?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 FRDM-KW40Z - Setting IRQ Handler results in interrupt in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-KW40Z-Setting-IRQ-Handler-results-in-interrupt/m-p/470147#M3739</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to set my own interrupt handler on the FRDM-KW40Z. The problem is, as soon as I call 'INT_SYS_InstallHandler', it causes an interrupt. I've attached GDB and found it occurs on line 80 of fsl_interrupt_manager.c, which is where the vector table is modified:&lt;/P&gt;&lt;PRE class="plain" name="code"&gt;__VECTOR_RAM[irqNumber + 16] = (uint32_t)handler;&lt;/PRE&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is consistent with a question I spotted &lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-objectid="354806" data-objecttype="1" href="https://community.nxp.com/thread/354806" rel="nofollow noopener noreferrer" target="_blank"&gt;from last year&lt;/A&gt;, which hasn't had a follow up yet.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also quite new to this, so I'm not sure whether I can attribute this to my lack of knowledge of the system, or a fault. My current code works off of the "hello_world" example, and can be replicated in just a few lines. I have attached a working example.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example code, the error occurs on line 97 of main.c.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339163" rel="nofollow noopener noreferrer" target="_blank"&gt;hello_world.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 10:48:01 GMT</pubDate>
    <dc:creator>sammathews</dc:creator>
    <dc:date>2016-05-13T10:48:01Z</dc:date>
    <item>
      <title>FRDM-KW40Z - Setting IRQ Handler results in interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-KW40Z-Setting-IRQ-Handler-results-in-interrupt/m-p/470147#M3739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to set my own interrupt handler on the FRDM-KW40Z. The problem is, as soon as I call 'INT_SYS_InstallHandler', it causes an interrupt. I've attached GDB and found it occurs on line 80 of fsl_interrupt_manager.c, which is where the vector table is modified:&lt;/P&gt;&lt;PRE class="plain" name="code"&gt;__VECTOR_RAM[irqNumber + 16] = (uint32_t)handler;&lt;/PRE&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is consistent with a question I spotted &lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-objectid="354806" data-objecttype="1" href="https://community.nxp.com/thread/354806" rel="nofollow noopener noreferrer" target="_blank"&gt;from last year&lt;/A&gt;, which hasn't had a follow up yet.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also quite new to this, so I'm not sure whether I can attribute this to my lack of knowledge of the system, or a fault. My current code works off of the "hello_world" example, and can be replicated in just a few lines. I have attached a working example.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example code, the error occurs on line 97 of main.c.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339163" rel="nofollow noopener noreferrer" target="_blank"&gt;hello_world.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 10:48:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-KW40Z-Setting-IRQ-Handler-results-in-interrupt/m-p/470147#M3739</guid>
      <dc:creator>sammathews</dc:creator>
      <dc:date>2016-05-13T10:48:01Z</dc:date>
    </item>
  </channel>
</rss>

