<?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>Kinetis MicrocontrollersのトピックRe: KL27 - KSDK - LLWU problem</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665834#M40929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have vectors in Flash the interrupt vector will need to be (probably) manually entered in the file that defines its content.&lt;BR /&gt;Looking at the code that you have used it is inserting it into RAM (are you sure of the project configuration and have you used interrupts successfully before?). I would normally expect the environment to ensure all this for you but I generally only work with the one that you are to fix bugs for clients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just checked by using uTasker code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;INTERRUPT_SETUP interrupt_setup;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // interrupt configuration parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = WAKEUP_INTERRUPT;&amp;nbsp; // configure as wake-up interrupt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_handler&amp;nbsp;&amp;nbsp;&amp;nbsp; = irq_run;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // run again after wake up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_priority&amp;nbsp;&amp;nbsp; = PRIORITY_PORT_C_INT; // interrupt priority level&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = PORTC;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the port that the interrupt input is on&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_bits&amp;nbsp; = PORTC_BIT1; // the IRQ input connected LLWU_P6 (SW3 on FRDM-KL27Z)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_sense = (IRQ_FALLING_EDGE | PULLUP_ON); // interrupt is to be falling edge sensitive&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;fnConfigureInterrupt((void *)&amp;amp;interrupt_setup);&amp;nbsp; // configure interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_bits&amp;nbsp; = PORTC_BIT4; // J2-6 on FRDM-KL27Z&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_handler&amp;nbsp;&amp;nbsp;&amp;nbsp; = irq_sleep;&amp;nbsp; // sleep again after wake-up interrupt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_sense = (IRQ_FALLING_EDGE | PULLUP_ON | ENABLE_PORT_MODE); // set the pin to port mode - &lt;EM&gt;this is needed if the pin is disabled by default otherwise the pull-up/LLWU functions won't work&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;fnConfigureInterrupt((void *)&amp;amp;interrupt_setup); // configure interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The binary is attached that operates on the FRDM-KL27Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the LPUART0 (OpenSDA VCOM) at 115200 Baud you can use the command line menu. In the "Admin" menu you can see the low power modes with "show_lp"&lt;BR /&gt;which displays:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;0 = RUN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;1 = WAIT [active]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;2 = STOP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;3 = VLPR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;4 = VLPW&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;5 = VLPS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;6 = LLS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;7 = VLLS0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;8 = VLLS1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;9 = VLLS3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now command LLS with "set_lp 6" and the board will freeze in the LLS state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you press SW2 (PTC1) it wakes up again to the running mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - restoring WAIT mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you go back to LLS you can then test a falling edge on PTC4 (J2-6) and it will wake up and immediately go back to LLS. Therefore if you wake up a number of times it displays:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the source from GITHUB if you like [visit &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;SPAN&gt; for links] - its LLWU mode is in the file kinetis_LLWU.h&lt;/SPAN&gt;&lt;BR /&gt;It also allows you to test the operation (wake up, interrupts etc. in its KL27 simulator - using Visual Studio) in case you would like to investigate the full details to work out the problem in your environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In case of urgent requirements such difficulties can be fixed within a short time via remote desktop using the services provided at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 May 2017 12:47:00 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2017-05-04T12:47:00Z</dc:date>
    <item>
      <title>KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665829#M40924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently working on a project that requires a LLWU pin to wakeup the KL27 from LLS STOP mode. When in sleepdeep mode I trigger the interrupt with a pushbutton (with pullup), The LLWU pin goes low. But instead of running my LLWU interrupt handler it fires the DefaulISR(). I Know this because I toggle a LED inside this ISR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have struggled with this for days now and I'm not able find any "clear" answers online..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I using KDS 3.2.0 &amp;amp; PE with KSDK 1.3.0 to setup LLWU pin 8 (GPIOC, pin 4) as a wakeup source. Negative edge triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the setup code generated by PE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From hardware_init.c&lt;/P&gt;&lt;P&gt;void hardware_init(void) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  /* Enable clock for PORTs */&lt;/P&gt;&lt;P&gt;  SIM_HAL_EnableClock(SIM,kSimClockGatePortA);&lt;/P&gt;&lt;P&gt;  SIM_HAL_EnableClock(SIM,kSimClockGatePortB);&lt;/P&gt;&lt;P&gt;  SIM_HAL_EnableClock(SIM,kSimClockGatePortC);&lt;/P&gt;&lt;P&gt;  SIM_HAL_EnableClock(SIM,kSimClockGatePortD);&lt;/P&gt;&lt;P&gt;  SIM_HAL_EnableClock(SIM,kSimClockGatePortE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  /* Setup board clock source. */&lt;/P&gt;&lt;P&gt;  g_xtal0ClkFreq = 0U;                  /* System oscillator 0 is not enabled */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  init_coredebug_pins(CoreDebug_IDX);&lt;/P&gt;&lt;P&gt;  init_gpio_pins(GPIOA_IDX);&lt;/P&gt;&lt;P&gt;  init_gpio_pins(GPIOC_IDX);&lt;/P&gt;&lt;P&gt;  init_gpio_pins(GPIOD_IDX);&lt;/P&gt;&lt;P&gt;  init_gpio_pins(GPIOE_IDX);&lt;/P&gt;&lt;P&gt;  init_i2c_pins(I2C0_IDX);&lt;/P&gt;&lt;P&gt;  init_i2c_pins(I2C1_IDX);&lt;/P&gt;&lt;P&gt;  init_llwu_pins(LLWU_IDX);&lt;/P&gt;&lt;P&gt;  init_lpuart_pins(LPUART1_IDX);&lt;/P&gt;&lt;P&gt;  init_scb_pins(SCB_IDX);&lt;/P&gt;&lt;P&gt;  init_uart_pins(UART2_IDX);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Cpu.c - Components_Init()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*! gpio_llwu_pins Auto initialization start */&lt;/P&gt;&lt;P&gt;  GPIO_DRV_Init(gpio_llwu_pins_InpWakup,NULL);&lt;/P&gt;&lt;P&gt;  /*! gpio_llwu_pins Auto initialization end */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  /*! pwrMan1 Auto initialization start */&lt;/P&gt;&lt;P&gt;  NVIC_SetPriority(LLWU_IRQn, 1U);&lt;/P&gt;&lt;P&gt;  OSA_InstallIntHandler(LLWU_IRQn, &amp;amp;pwrMan1_llwuIRQHandler);&lt;/P&gt;&lt;P&gt;  POWER_SYS_Init(powerConfigsArr, 1U, NULL , 0U);&lt;/P&gt;&lt;P&gt;  POWER_SYS_SetWakeupPin(kPowerManagerWakeupPin8, kLlwuExternalPinFallingEdge, NULL);&lt;/P&gt;&lt;P&gt;  INT_SYS_EnableIRQ(LLWU_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Interrupt handler is automatically added to Events.c and the prototype in Events.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void pwrMan1_llwuIRQHandler(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  /* Write your code here. For example clear LLWU wake up flags ... */&lt;/P&gt;&lt;P&gt;       //CheckModeButton();&lt;/P&gt;&lt;P&gt;       POWER_SYS_ClearWakeupPinFlag(kPowerManagerWakeupPin8);&lt;/P&gt;&lt;P&gt;       GPIO_DRV_ClearPinOutput(LED_GREEN2);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Med vennlig hilsen,&lt;/P&gt;&lt;P&gt;Thomas Haugen&lt;/P&gt;&lt;P&gt;Software Development Engineer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GSM: +47 930 35 863&lt;/P&gt;&lt;P&gt;E-mail: thomas.haugen@7sense.no&amp;lt;mailto:thomas.haugen@7sense.no&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7Sense Technologies AS&lt;/P&gt;&lt;P&gt;Kongeveien 73               Tel:  +47 33 08 44 00&lt;/P&gt;&lt;P&gt;3188 Horten                    Fax: +47 33 08 44 01&lt;/P&gt;&lt;P&gt;Norway                           E-mail: sales@7sense.no&amp;lt;mailto:sales@7sense.no&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 10:35:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665829#M40924</guid>
      <dc:creator>thomas_haugen</dc:creator>
      <dc:date>2017-05-03T10:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665830#M40925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are getting an interrupt it means that the processor has been (successfully) woken - it then will take the pending LLWU interrupt (assuming configured and not masked).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the interrupt is causing the default handler to be called it must mean that the interrupt vector is not present in the vector table (it will depend on whether you have vectors in Flash of in RAM on how this is done).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative potential issue could be that the low power mode is not actually being entered and you have a port interrupt enabled on the pin that hasn't be set up correctly - but much less likely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some background at&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FLLWU.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/LLWU.html&lt;/A&gt;&lt;BR /&gt;and videos at&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiZEMRiDmHzw" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=iZEMRiDmHzw&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkWNlsAoMly4" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=kWNlsAoMly4&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv4UnfcDiaE4" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=v4UnfcDiaE4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full low power operation is available in the code at the link below in case you would like to use a proven solution rather than fight with the case tool outputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;SPAN&gt; for quality Kinetis firmware&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 15:41:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665830#M40925</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-05-03T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665831#M40926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vector table is placed in FLASH. Is that the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked that the handler is installed correctly in the vector table with irqNumber = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OSA_InstallIntHandler(LLWU_IRQn, &amp;amp;pwrMan1_llwuIRQHandler);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method is again calling:&lt;/P&gt;&lt;P&gt;void * INT_SYS_InstallHandler(IRQn_Type irqNumber, void (*handler)(void))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;#if (defined(__CC_ARM))&lt;/P&gt;&lt;P&gt;    extern uint32_t Image$$VECTOR_RAM$$Base[];&lt;/P&gt;&lt;P&gt;    #define __VECTOR_RAM Image$$VECTOR_RAM$$Base&lt;/P&gt;&lt;P&gt;#else&lt;/P&gt;&lt;P&gt;    extern uint32_t __VECTOR_RAM[];&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    /* Check IRQ number */&lt;/P&gt;&lt;P&gt;    assert(FSL_FEATURE_INTERRUPT_IRQ_MIN &amp;lt;= irqNumber);&lt;/P&gt;&lt;P&gt;    assert(irqNumber &amp;lt;= FSL_FEATURE_INTERRUPT_IRQ_MAX);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    /* Check whether there is vector table in RAM */&lt;/P&gt;&lt;P&gt;    assert(__VECTOR_RAM != 0U);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    /* Save the former handler pointer */&lt;/P&gt;&lt;P&gt;    void * retVal = (void *)__VECTOR_RAM[irqNumber + 16];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    /* Set handler into vector table */&lt;/P&gt;&lt;P&gt;    __VECTOR_RAM[irqNumber + 16] = (uint32_t)handler;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    return retVal;&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;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fra: mjbcswitzerland &lt;/P&gt;&lt;P&gt;Sendt: 3. mai 2017 17:42&lt;/P&gt;&lt;P&gt;Til: Thomas Haugen &amp;lt;thomas.haugen@7sense.no&amp;gt;&lt;/P&gt;&lt;P&gt;Emne: Re:  - Re: KL27 - KSDK - LLWU problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NXP Community &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re: KL27 - KSDK - LLWU problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from Mark Butcher&amp;lt;https://community.nxp.com/people/mjbcswitzerland?et=watches.email.thread&amp;gt; in Kinetis Microcontrollers - View the full discussion&amp;lt;https://community.nxp.com/message/902174?commentID=902174&amp;amp;et=watches.email.thread#comment-902174&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 07:25:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665831#M40926</guid>
      <dc:creator>thomas_haugen</dc:creator>
      <dc:date>2017-05-04T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665832#M40927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please try to test the power_manager in &lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt;SDK_2.2_FRDM-KL27Z&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;...\SDK_2.2_FRDM-KL27Z\boards\frdmkl27z\demo_apps\power_manager&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SDK_2.2_FRDM-KL27Z.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/19045i343E7E861C9EEE62/image-size/large?v=v2&amp;amp;px=999" role="button" title="SDK_2.2_FRDM-KL27Z.png" alt="SDK_2.2_FRDM-KL27Z.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Power Manager Demo LLS.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/19091iE63355C517E6620D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Power Manager Demo LLS.png" alt="Power Manager Demo LLS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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>Thu, 04 May 2017 09:34:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665832#M40927</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-05-04T09:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665833#M40928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally solved the problem. The problem was that I used PE to generate the INIT code for the LLWU handler and by another name than the default ISR name LLWU_IRQHandler()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I commented out the OSA_InstallIntHandler() call and manually added the LLWU_IRQHandler()&lt;/P&gt;&lt;P&gt;in Events.c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using PE to install handlers and callbacks for UART’s, I2C etc works fine, but not for the LLWU. Why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fra: Robin_Shen &lt;/P&gt;&lt;P&gt;Sendt: 4. mai 2017 11:36&lt;/P&gt;&lt;P&gt;Til: Thomas Haugen &amp;lt;thomas.haugen@7sense.no&amp;gt;&lt;/P&gt;&lt;P&gt;Emne: Re:  - Re: KL27 - KSDK - LLWU problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NXP Community &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re: KL27 - KSDK - LLWU problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from Robin_Shen&amp;lt;https://community.nxp.com/people/Robin_Shen?et=watches.email.thread&amp;gt; in Kinetis Microcontrollers - View the full discussion&amp;lt;https://community.nxp.com/message/902412?commentID=902412&amp;amp;et=watches.email.thread#comment-902412&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 12:20:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665833#M40928</guid>
      <dc:creator>thomas_haugen</dc:creator>
      <dc:date>2017-05-04T12:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665834#M40929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have vectors in Flash the interrupt vector will need to be (probably) manually entered in the file that defines its content.&lt;BR /&gt;Looking at the code that you have used it is inserting it into RAM (are you sure of the project configuration and have you used interrupts successfully before?). I would normally expect the environment to ensure all this for you but I generally only work with the one that you are to fix bugs for clients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just checked by using uTasker code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;INTERRUPT_SETUP interrupt_setup;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // interrupt configuration parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = WAKEUP_INTERRUPT;&amp;nbsp; // configure as wake-up interrupt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_handler&amp;nbsp;&amp;nbsp;&amp;nbsp; = irq_run;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // run again after wake up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_priority&amp;nbsp;&amp;nbsp; = PRIORITY_PORT_C_INT; // interrupt priority level&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = PORTC;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the port that the interrupt input is on&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_bits&amp;nbsp; = PORTC_BIT1; // the IRQ input connected LLWU_P6 (SW3 on FRDM-KL27Z)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_sense = (IRQ_FALLING_EDGE | PULLUP_ON); // interrupt is to be falling edge sensitive&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;fnConfigureInterrupt((void *)&amp;amp;interrupt_setup);&amp;nbsp; // configure interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_bits&amp;nbsp; = PORTC_BIT4; // J2-6 on FRDM-KL27Z&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_handler&amp;nbsp;&amp;nbsp;&amp;nbsp; = irq_sleep;&amp;nbsp; // sleep again after wake-up interrupt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;interrupt_setup.int_port_sense = (IRQ_FALLING_EDGE | PULLUP_ON | ENABLE_PORT_MODE); // set the pin to port mode - &lt;EM&gt;this is needed if the pin is disabled by default otherwise the pull-up/LLWU functions won't work&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;fnConfigureInterrupt((void *)&amp;amp;interrupt_setup); // configure interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The binary is attached that operates on the FRDM-KL27Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the LPUART0 (OpenSDA VCOM) at 115200 Baud you can use the command line menu. In the "Admin" menu you can see the low power modes with "show_lp"&lt;BR /&gt;which displays:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;0 = RUN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;1 = WAIT [active]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;2 = STOP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;3 = VLPR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;4 = VLPW&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;5 = VLPS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;6 = LLS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;7 = VLLS0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;8 = VLLS1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;9 = VLLS3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now command LLS with "set_lp 6" and the board will freeze in the LLS state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you press SW2 (PTC1) it wakes up again to the running mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - restoring WAIT mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you go back to LLS you can then test a falling edge on PTC4 (J2-6) and it will wake up and immediately go back to LLS. Therefore if you wake up a number of times it displays:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WOKEN - going to LSS again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the source from GITHUB if you like [visit &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;SPAN&gt; for links] - its LLWU mode is in the file kinetis_LLWU.h&lt;/SPAN&gt;&lt;BR /&gt;It also allows you to test the operation (wake up, interrupts etc. in its KL27 simulator - using Visual Studio) in case you would like to investigate the full details to work out the problem in your environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In case of urgent requirements such difficulties can be fixed within a short time via remote desktop using the services provided at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2017 12:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665834#M40929</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-05-04T12:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665835#M40930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if it was caused by the difference below.&lt;/P&gt;&lt;P&gt;The OSA_InstallIntHandler in Components_Init.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Components_Init.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18588iCE23E45005D14D50/image-size/large?v=v2&amp;amp;px=999" role="button" title="Components_Init.png" alt="Components_Init.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Components_Init_c.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18638i710352E3E2F18C97/image-size/large?v=v2&amp;amp;px=999" role="button" title="Components_Init_c.png" alt="Components_Init_c.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 08:55:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665835#M40930</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-05-09T08:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665836#M40931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I tried to remove the &amp;amp;, it made no difference. I had to comment out the //OSA_InstallIntHandler then add the default function handler, void LLWU_IRQHandler(void), into Events.c.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm installing handlers for TPM0, I2C0, I2C1, UART2 and LPUART1 with OSA_InstallIntHandler(). It works fine, but not for the LLWU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 09:09:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665836#M40931</guid>
      <dc:creator>thomas_haugen</dc:creator>
      <dc:date>2017-05-09T09:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: KL27 - KSDK - LLWU problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665837#M40932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Configure the PTC1 as LLWU wakeup pin. Test with FRDM-KL27Z board, the GREEN LED will light after press the SW3 buttom.&lt;/P&gt;&lt;P&gt;Attach file is that test project.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 09:30:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL27-KSDK-LLWU-problem/m-p/665837#M40932</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-05-09T09:30:29Z</dc:date>
    </item>
  </channel>
</rss>

