<?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: ISR in Kinetis L in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249388#M6952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok...thank you one and all.&lt;/P&gt;&lt;P&gt;I've tested this and this works.&lt;/P&gt;&lt;P&gt;Well I think basic idea is that correspoinding to a IRQ function in Kinetis_sysinit.c, you have to create a function by the same name (Example UART0_IRQHandler() for UART0). The newly defined function would be the ISR for the interrut(UART0 in this case).&lt;/P&gt;&lt;P&gt;Let me know if I've missed anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2013 01:22:35 GMT</pubDate>
    <dc:creator>vivacious</dc:creator>
    <dc:date>2013-02-11T01:22:35Z</dc:date>
    <item>
      <title>ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249383#M6947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking to write an ISR in C (bare metal) for one Kinetis L.&lt;BR /&gt;However I didn't get any procedure to setup any particular ISR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody guide me where should I look for these details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....Still better if I can get an example code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 12:46:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249383#M6947</guid>
      <dc:creator>vivacious</dc:creator>
      <dc:date>2013-02-06T12:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249384#M6948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;I can tell you how I got working ISR for Kinetis, but I guess it depends on the toolchain you're using.&lt;/P&gt;&lt;P&gt;With IAR Embedded Workbench, I just declare the ISR like a normal routine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void lptmr_isr(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lp_seconds++;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPTMR0_CSR |= LPTMR_CSR_TCF_MASK;&amp;nbsp;&amp;nbsp; // write 1 to TCF to clear the LPT timer compare flag&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example I use LPTMR for 1 second interrupt; I have a file named vectors.c taken from the sample code. It declares an array and forces it to be allocated in the intvec segment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma location = ".intvec"&lt;/P&gt;&lt;P&gt;const vector_entry&amp;nbsp; __vector_table[] = //@ ".intvec" =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; VECTOR_000,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initial SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; VECTOR_001,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initial PC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; VECTOR_002,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; VECTOR_003,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;The entries VECTOR_*** are defined in vectors.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#define VECTOR_000&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;(pointer*)__BOOT_STACK_ADDRESS&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;#define VECTOR_001&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;__startup&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;#define VECTOR_002&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;default_isr&lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you just have to substitue the right entry with your ISR. I'm working this way on KL15, KL25, K70 families.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 13:18:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249384#M6948</guid>
      <dc:creator>marcopalestro</dc:creator>
      <dc:date>2013-02-06T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249385#M6949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response Marco....though I should have mentioned that I am using CodeWarrior10.3.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think this should help.......Let me check.&lt;/P&gt;&lt;P&gt;Looking forward to more explanations/responses ......like more generic ones.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 17:36:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249385#M6949</guid>
      <dc:creator>vivacious</dc:creator>
      <dc:date>2013-02-06T17:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249386#M6950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look in kinetis_sysinit.c.&lt;/P&gt;&lt;P&gt;For example, if I define " void SysTick_Handler(){}" else where, that will go in the vector table due to the weak keyword.&lt;/P&gt;&lt;P&gt;In ARM, a plain"C" function can be an interrupt handler, as the hardware knows that when a function returns it was from an interrupt, and how to handle it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 19:07:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249386#M6950</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-02-06T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249387#M6951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put this in main.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13602036185701814 jive_text_macro jive_macro_code" jivemacro_uid="_13602036185701814" modifiedtitle="true"&gt;
&lt;P&gt;/*&lt;/P&gt;
&lt;P&gt; *&amp;nbsp; SET_NMI_INTERRUPT() - This will cause an NMI interrupt.&lt;/P&gt;
&lt;P&gt; *&amp;nbsp; It is a one shot, and does not need to be reset.&lt;/P&gt;
&lt;P&gt; */&lt;/P&gt;
&lt;P&gt;#define SET_NMI_INTERRUPT() SCB_ICSR |= SCB_ICSR_NMIPENDSET_MASK&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;volatile int nmi_counter=0;&lt;/P&gt;
&lt;P&gt;void NMI_Handler() // override the weak definition&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ++nmi_counter; // Put a break point here.&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;int main(int argc,char **argv) &lt;/P&gt;
&lt;P&gt;{&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET_NMI_INTERRUPT();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;|&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 02:22:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249387#M6951</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-02-07T02:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: ISR in Kinetis L</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249388#M6952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok...thank you one and all.&lt;/P&gt;&lt;P&gt;I've tested this and this works.&lt;/P&gt;&lt;P&gt;Well I think basic idea is that correspoinding to a IRQ function in Kinetis_sysinit.c, you have to create a function by the same name (Example UART0_IRQHandler() for UART0). The newly defined function would be the ISR for the interrut(UART0 in this case).&lt;/P&gt;&lt;P&gt;Let me know if I've missed anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 01:22:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ISR-in-Kinetis-L/m-p/249388#M6952</guid>
      <dc:creator>vivacious</dc:creator>
      <dc:date>2013-02-11T01:22:35Z</dc:date>
    </item>
  </channel>
</rss>

