<?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 FreeRTOS + interrupt handling using KSDK 1.2.0 / KDS 3.0 in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442232#M2844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to get the interrupt working. Just a simple interrupt from a switch. As I am using safeRTOS instead of FreeRTOS which is a similar component but not same. OSAL layer for hte safeRTOS has been defined properly. The port interrupts are getting called but not able to really get an interrupt on a specific pin. To an extent, not able to pin down on the issue right now. Any guides or documentation which figures out interrupt mechanism on FreeRTOS would help. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Oct 2015 17:46:55 GMT</pubDate>
    <dc:creator>Kewal</dc:creator>
    <dc:date>2015-10-08T17:46:55Z</dc:date>
    <item>
      <title>FreeRTOS + interrupt handling using KSDK 1.2.0 / KDS 3.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442232#M2844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to get the interrupt working. Just a simple interrupt from a switch. As I am using safeRTOS instead of FreeRTOS which is a similar component but not same. OSAL layer for hte safeRTOS has been defined properly. The port interrupts are getting called but not able to really get an interrupt on a specific pin. To an extent, not able to pin down on the issue right now. Any guides or documentation which figures out interrupt mechanism on FreeRTOS would help. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 17:46:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442232#M2844</guid>
      <dc:creator>Kewal</dc:creator>
      <dc:date>2015-10-08T17:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS + interrupt handling using KSDK 1.2.0 / KDS 3.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442233#M2845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have actually configured the event to generate code for that particular interrupt. Now that I am seeing the error as&amp;nbsp; below&lt;span class="lia-inline-image-display-wrapper" image-alt="Untitled.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58750iD32F6C6E82CB3E99/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, I am using IAR embedded workbench 7.2 to build my own project file with all the generated the source code from KDS (PE).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 19:04:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442233#M2845</guid>
      <dc:creator>Kewal</dc:creator>
      <dc:date>2015-10-08T19:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS + interrupt handling using KSDK 1.2.0 / KDS 3.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442234#M2846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kewal,&lt;/P&gt;&lt;P&gt;A quick test that can be done is inherent (but hidden) within KSDK_1.3 FreeRTOS power manager rtos demo.&lt;/P&gt;&lt;P&gt;C:\Freescale\KSDK_1.3.0\examples\twrk65f180m\demo_apps\power_manager_rtos_demo\power_manager_rtos_demo_freertos\iar &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example already sets up an interrupt handler for a push button switch on the board.&lt;/P&gt;&lt;P&gt;It takes some digging to find where all the magic is happening and making a small code edit too.&lt;/P&gt;&lt;P&gt;In board.h I had made edit:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#define BOARD_SW_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SW3"&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;//DES was "SW1"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In gpio_pins.c I enable the interrupt for kGpioSW1 (which really is SW3 on the twrk65f180m):&lt;/P&gt;&lt;P&gt;const gpio_input_pin_user_config_t switchPins[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .pinName = kGpioSW1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .config.isPullEnable = true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .config.pullSelect = kPortPullUp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .config.isPassiveFilterEnabled = false,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .config.isDigitalFilterEnabled = false,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .config.interrupt = kPortIntFallingEdge&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //DES was kPortIntDisabled&lt;/P&gt;&lt;P&gt;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In gpio_pins.h header comments added:&lt;/P&gt;&lt;P&gt;enum _gpio_pins_pinNames{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; kGpioSW1 = GPIO_MAKE_PIN(GPIOA_IDX, 10U), //DES SW3 on TWR-K65F180M Rev D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; kGpioSW2 = GPIO_MAKE_PIN(GPIOA_IDX, 4U), //DES SW2 on TWR-K65F180M Rev D&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Also in this header is following renaming:&lt;/P&gt;&lt;P&gt;#define BOARD_SW_LLWU_IRQ_HANDLER&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA_IRQHandler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PORTA_IRQHandler is a default that is weakly defined in startup_MK65F18.s file.&amp;nbsp; When you implement the same name function in your application code you are overloading the function and it will be used.&amp;nbsp; This happens in task_lpm.c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In task_lpm.c is where the Interrupt handler has been defined for the power management demo but it also will clear the GPIO Port A interrupt flag (Note Any interrupt for Port A pins go to one interrupt routine and that routine if more robust would determine which pin was the interrupt source but our demo doesn't do that).&lt;/P&gt;&lt;P&gt;/* IRQ handler for switch/button. */&lt;/P&gt;&lt;P&gt;void BOARD_SW_LLWU_IRQ_HANDLER(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;#if 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //DES 0=test, 1=default code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_HAL_ClearPortIntFlag(BOARD_SW_LLWU_BASE);&lt;/P&gt;&lt;P&gt;#else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_DRV_ClearPinIntFlag(kGpioSW1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //DES added...this does work too and the two statements are equivalent &lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 13:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FreeRTOS-interrupt-handling-using-KSDK-1-2-0-KDS-3-0/m-p/442234#M2846</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-10-09T13:30:21Z</dc:date>
    </item>
  </channel>
</rss>

