<?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: FRDM KE06Z: How to access Interrupt service program? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451082#M26740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help. I conquer the problem.I forgot to set the Interrupt vector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2015 02:00:19 GMT</pubDate>
    <dc:creator>scofieldwolff</dc:creator>
    <dc:date>2015-05-28T02:00:19Z</dc:date>
    <item>
      <title>FRDM KE06Z: How to access Interrupt service program?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451079#M26737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I just use Kinetis E series MCU. And use GPIO_demo code to test my board, I wanna use Interrupt service program to light LED for 1Hz. But never access the Interrupt service program, I check the demo program, and set NVIC_ISER&amp;nbsp; and RTC_RTIE, this 's OK.&amp;nbsp;&amp;nbsp; However, dont using interrput program to lingt LED, and polling RTIF flag code is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont kown how to access interrupt service program,&amp;nbsp;&amp;nbsp; THX&amp;nbsp; for your Help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 02:17:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451079#M26737</guid>
      <dc:creator>scofieldwolff</dc:creator>
      <dc:date>2015-05-21T02:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM KE06Z: How to access Interrupt service program?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451080#M26738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello scofield,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you firstly refer to a GPIO interrupt demo code&amp;nbsp; .&lt;/P&gt;&lt;P&gt;And which IDE do you use ? If CW , please refer to here :&lt;/P&gt;&lt;P&gt;&amp;nbsp; ....\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Kinetis_Examples\KE\build\cw\ke06\GPIO_demo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not use this , i attachment the main file , i think you can refer to .&lt;/P&gt;&lt;P&gt;If you have some question about this demo , you can tell me !&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 08:41:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451080#M26738</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-05-22T08:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM KE06Z: How to access Interrupt service program?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451081#M26739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;Hi Scofield,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;When using an Interrupt Service Routine (ISR) you have to consider next conditions:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When Configuring your Peripheral (In my case I will use PIT_CH0 as Interrupt source) you have to set the right flags to request an interrupt:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Figure 1.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/30001i59DF1808D34F89E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Figure 1.jpg" alt="Figure 1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Then, you must enable its respective vector in the NVIC module. This steps consists to write to specific &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000c0;"&gt;ISER &lt;/SPAN&gt;register and set its priority:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: .0001pt;"&gt;As you can see on Interrupt Vector Assignments table on MCU’s reference manual, PIT_CH0 vector is expressed as 38, however, when enable this vector on NVIC module, we must select IRQ value (38 – 16 = 22; It subtracts 16 because the first 16 vectors are core-vectors.)&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Figure 2.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/30501i69CC5961E5D581C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Figure 2.jpg" alt="Figure 2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;After NVIC configuration is done, We must enable all interrupts in the core, this is done by using the assembler instruction:&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #2a00ff;"&gt;CPSIE i:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-left: 1.5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #3f7f5f;"&gt;/* Enable interrupts (clear PRIMASK) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.5in;"&gt;&lt;SPAN style="color: #7f0055; font-size: 10.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; ENABLE_INTERRUPTS&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #2a00ff;"&gt;" CPSIE i"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Then, we must implement our ISR. In this ISR we must clear the specific flag that causes the interrupt request.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-left: 1.0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #7f0055; font-size: 10.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;PIT_CH0_IRQHandler&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10.0pt; font-family: Consolas;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #3f7f5f;"&gt;/* Clear Timer Interrupt Flag */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT_TFLG0 |= PIT_TFLG_TIF_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #3f7f5f;"&gt;/* Do your ISR proccess here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;At this point, how does the MCU knows that PIT_CH0_IRQHanlder corresponds to PIT0? Well, there is a table located at: &lt;STRONG&gt;&lt;EM&gt;Project_Settings &amp;gt; Startup_Code &amp;gt; kinetis_sysinit.c &lt;/EM&gt;&lt;/STRONG&gt;(for CodeWarrior 10.6 and bare metal project)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Figure 3.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/30639iF4CA5DC34647681D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Figure 3.jpg" alt="Figure 3.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;In this source file, there is a table where all ISR are declared, so make sure your ISR is named exactly the same as in &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;InterruptVector &lt;/SPAN&gt;table:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Figure 4.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/30704i6DFA64169C6A2F98/image-size/large?v=v2&amp;amp;px=999" role="button" title="Figure 4.jpg" alt="Figure 4.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;After following these steps you shouldn’t have any problems on attending the specific ISR.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the project (It was done using a KE04 board) but hope this could serve as example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac Avila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 14:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451081#M26739</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2015-05-22T14:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM KE06Z: How to access Interrupt service program?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451082#M26740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help. I conquer the problem.I forgot to set the Interrupt vector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 02:00:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451082#M26740</guid>
      <dc:creator>scofieldwolff</dc:creator>
      <dc:date>2015-05-28T02:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM KE06Z: How to access Interrupt service program?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451083#M26741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I solve the problem. I set RTC interrupt exactly, but I forgot to set my ISR code to the interrupt vector.&amp;nbsp;&amp;nbsp; However, I take a Macro for linking my interrupt service code to interrupt vector. In the interrupt souce file, I do it as follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifndefine RTC_IRQHandler&lt;/P&gt;&lt;P&gt;#define RTC_IRQHandler&amp;nbsp; RTC_Isr&amp;nbsp; // RTC-Isr is my interrupt code.&lt;/P&gt;&lt;P&gt;extern void RTC_Isr(void);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before making&amp;nbsp; the Macro ,&amp;nbsp; I comment the RTC_IRQHandler Func. declaration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 02:12:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KE06Z-How-to-access-Interrupt-service-program/m-p/451083#M26741</guid>
      <dc:creator>scofieldwolff</dc:creator>
      <dc:date>2015-05-28T02:12:52Z</dc:date>
    </item>
  </channel>
</rss>

