<?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: Interrupt with parameters in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Interrupt-with-parameters/m-p/1156333#M15464</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you possibly describe what are you trying to achieve by passing the parameter to the interrupt handler?&lt;/P&gt;
&lt;P&gt;Interrupt handler is called/executed asynchronously typically by a hardware event so IMAO there is no chance to pass any parameter to it.&lt;/P&gt;
&lt;P&gt;Therefore interrupts are typically declared as void functions without partameters.&lt;/P&gt;
&lt;P&gt;What about using global variable instead of parameter?&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2020 14:40:33 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2020-09-21T14:40:33Z</dc:date>
    <item>
      <title>Interrupt with parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Interrupt-with-parameters/m-p/1156085#M15463</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using codewarrior IDE for a MC9s08JM16 cpu.&lt;/P&gt;&lt;P&gt;I'm trying to use a interrupt with parameters. When I write the next interrupt in the MCUinit.c file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__interrupt void isrVkeyboard(bool ON)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ON = ~ON;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(ON) // Si está encendido el motor&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LedVerde = 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}else{ // Si está parado el motor&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LVerde = 0;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;KBISC_KBACK = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got an error point out that this error is pinpointed in the next function:&lt;/P&gt;&lt;P&gt;static void (* near const _vect[])(void) @0xFFC4 = { /* Interrupt vector table */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; isrVrtc, /* Int.no. 29 Vrtc (at FFC4) Used */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; UNASSIGNED_ISR, /* Int.no. 28 Viic (at FFC6) Unassigned */&lt;BR /&gt;-&amp;gt;&amp;nbsp; &amp;nbsp;isrVkeyboard, /* Int.no. 25 Vkeyboard (at FFCC) Used */&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _Startup&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 07:49:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Interrupt-with-parameters/m-p/1156085#M15463</guid>
      <dc:creator>slanfys</dc:creator>
      <dc:date>2020-09-21T07:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt with parameters</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Interrupt-with-parameters/m-p/1156333#M15464</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you possibly describe what are you trying to achieve by passing the parameter to the interrupt handler?&lt;/P&gt;
&lt;P&gt;Interrupt handler is called/executed asynchronously typically by a hardware event so IMAO there is no chance to pass any parameter to it.&lt;/P&gt;
&lt;P&gt;Therefore interrupts are typically declared as void functions without partameters.&lt;/P&gt;
&lt;P&gt;What about using global variable instead of parameter?&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 14:40:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Interrupt-with-parameters/m-p/1156333#M15464</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2020-09-21T14:40:33Z</dc:date>
    </item>
  </channel>
</rss>

