<?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: Wakeup problem in LLS mode !! in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212314#M5271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can't use LPM API functions within ISR routine. The only exception is _lpm_wakeup_core(). So please remove _lpm_set_operation_mode(RUN) from your LLWU ISR.&lt;/P&gt;&lt;P&gt;One more thing: do not feed _lpm_set_cpu_operation_mode() using your own settings while LPM is installed with other settings, that's not safe operation. The power_mode variable is out of range of your operation modes array in your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 17:46:09 GMT</pubDate>
    <dc:creator>PetrM</dc:creator>
    <dc:date>2012-03-15T17:46:09Z</dc:date>
    <item>
      <title>Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212311#M5268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using K60N512 and mode of LLS low power&amp;nbsp; -&amp;gt; power_mode=LPM_OPERATION_MODE_STOP;&lt;/P&gt;&lt;P&gt;after setting ok the sources for wake up and watching to the registers value before entering in sleep mode. The core is not recovering from sleep. The problem is the example what is wake up by the RTC interrupt is working but by pin wakeup is not working. I've tested the connection before entering in sleep and the isr for that pin is working.&lt;/P&gt;&lt;P&gt;this is the code for pin initialization&lt;/P&gt;&lt;PRE&gt;SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK|SIM_SCGC5_PORTB_MASK|SIM_SCGC5_PORTC_MASK       |SIM_SCGC5_PORTD_MASK|SIM_SCGC5_PORTE_MASK;    PORTC_PCR3=PORT_PCR_MUX(1)|PORT_PCR_IRQC(0xA)|PORT_PCR_PE_MASK|PORT_PCR_PS_MASK;    _int_install_isr(INT_PORTC,(pointer)my_isr,NULL);    _bsp_int_init(INT_PORTC,4,0,TRUE);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and this is the code for setting sleep mode:&lt;/P&gt;&lt;PRE&gt;power_mode = LPM_OPERATION_MODE_STOP;        printf("**************** Current Mode : %s **********************\n", predefined_power_modes_names[power_mode]);                set.PE1=1;//LPM_CPU_OPERATION_MODES[power_mode].PE1|0x01;        set.PE2=LPM_CPU_OPERATION_MODES[power_mode].PE2+2;        set.PE3=LPM_CPU_OPERATION_MODES[power_mode].PE3;        set.PE4=LPM_CPU_OPERATION_MODES[power_mode].PE4;        set.FLAGS=LPM_CPU_OPERATION_MODES[power_mode].FLAGS;        set.ME=LPM_CPU_OPERATION_MODES[power_mode].ME;        set.MODE_INDEX=LPM_CPU_OPERATION_MODES[power_mode].MODE_INDEX;                        pstOpMode = &amp;amp;set;                //_lpm_set_cpu_operation_mode(pstOpMode,power_mode);       /* if (MQX_OK != _lpm_install (&amp;amp;set, power_mode))        {        printf ("Error during LPM install!\n");        }*/        display_operation_mode_setting(power_mode);        printf(        "Info: STOP mode is mapped to Kinets LLS mode by default.\n"        "      Core and most peripherals are inactive in this mode, reacting only to\n"        "      specified wake up events. The events can be changed in BSP (init_lpm.c).\n"        "      Serial line is turned off in this mode. The core will wake up from\n"        "      RTC interrupt.\n");                /* Wake up in 60 seconds */        set_rtc_alarm(20);        //enable WAKE up pin 0 from LLWU as pin PTE1, and B10 connector on tower)        //LPM_CPU_OPERATION_MODES[power_mode].PE1=(uint_8)0x01;       _int_install_isr(INT_LLW,(pointer)llwu_isr,NULL);       _bsp_int_init(INT_LLW,2,0,TRUE);        /* Change the operation mode */        printf ("\nSetting operation mode to %s ... \n", predefined_power_modes_names[power_mode]);        _lpm_set_operation_mode (power_mode);               /* Return to RUN mode */        _lpm_set_operation_mode (LPM_OPERATION_MODE_RUN);                printf("\nCore is awake. Moved to next operation mode.\n");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and this is the interrupt for wakeup:&lt;/P&gt;&lt;PRE&gt;void llwu_isr(void){ _lpm_wakeup_core();  _lpm_set_operation_mode (LPM_OPERATION_MODE_RUN);// printf("Core wake up by LLWU PIN0 source\n"); LLWU_CS |= LLWU_CS_ACKISO_MASK;    // clear LLWU acknowledge flag     LLWU_F1 = 0xFF;            // clear wakeup flags     LLWU_F2 = 0xFF;            // clear wakeup flags     LLWU_F3 = 0xFF;            // clear wakeup flags}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 21:56:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212311#M5268</guid>
      <dc:creator>Nana</dc:creator>
      <dc:date>2012-03-02T21:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212312#M5269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nana,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, before i even check your code, have you checked the errata for K60 board for your maskset? What's your maskset? There was reported an issue with wake up from LLS mode .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 03:43:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212312#M5269</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-03-03T03:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212313#M5270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read the errata document "Mask Set Errata for Mask 4N30D" and I'm not using the NMI interrupt for wakeup the cpu from LLS state. And second I have connect the debugger to the board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For wakeup source I use PIN PTC3.&lt;/P&gt;&lt;P&gt;So the LPM_initialization is this :&lt;/P&gt;&lt;PRE&gt; // LPM_OPERATION_MODE_STOP    {        LPM_CPU_POWER_MODE_KINETIS_LLS,             // Index of predefined mode        0,                                          // Additional mode flags        LLWU_PE1_WUPE0(3), //was 0                  // Mode wake up events from pins 0..3        LLWU_PE2_WUPE7(2),                          // Mode wake up events from pins 4..7        0,                              // Mode wake up events from pins 8..11 - SW3 rising        0,                                          // Mode wake up events from pins 12..15        LLWU_ME_WUME5_MASK                          // Mode wake up events from internal input sources - RTC    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 16:46:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212313#M5270</guid>
      <dc:creator>Nana</dc:creator>
      <dc:date>2012-03-05T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212314#M5271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can't use LPM API functions within ISR routine. The only exception is _lpm_wakeup_core(). So please remove _lpm_set_operation_mode(RUN) from your LLWU ISR.&lt;/P&gt;&lt;P&gt;One more thing: do not feed _lpm_set_cpu_operation_mode() using your own settings while LPM is installed with other settings, that's not safe operation. The power_mode variable is out of range of your operation modes array in your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 17:46:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212314#M5271</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2012-03-15T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212315#M5272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am having problems waking up from sleep/stop mode,I set the external pin in LLWU&amp;nbsp; setting enabled and in the routine of detecting that interrupt set&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Cpu_SetOperationMode(DOM_RUN, NULL, NULL); but I think the processor isn't detecting any interrupt. Also when entering the stop mode (VLLS) the board losses connection . All I need is a blinking led and via an external interrupt(falling edge) to set the processor in sleep and wake it up when rising edge on the interrupt is detected. I am using processor expert.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;main looks like this :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;int main(void)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; /* Write your local variable definition here */&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; PE_low_level_init();&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;EInt1_Enable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Cpu_VLPModeEnable();&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; while(1){&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Bit1_SetVal();WAIT1_Waitms(100);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Bit1_ClrVal();WAIT1_Waitms(100);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;in events.c&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;void EInt1_OnInterrupt(void)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; WAIT1_Waitms(100);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if (EInt1_GetVal())&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; {&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; Cpu_SetOperationMode(DOM_RUN, NULL, NULL);/* Write your code here ... */}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;else {&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp; Cpu_SetOperationMode(DOM_STOP, NULL, NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; }&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Also tried this :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;void Cpu_OnLLSWakeUpINT(void)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;{&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;v = Cpu_SetOperationMode(DOM_RUN, NULL, NULL);// v is a char&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Bit1_SetVal();WAIT1_Waitms(100);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Bit1_ClrVal();WAIT1_Waitms(100);// just to see if it is entering this function&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&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, 11 Jul 2013 10:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212315#M5272</guid>
      <dc:creator>donejtaelshani</dc:creator>
      <dc:date>2013-07-11T10:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wakeup problem in LLS mode !!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212316#M5273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need the configure the wake up source and enable the IRQ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 17:29:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Wakeup-problem-in-LLS-mode/m-p/212316#M5273</guid>
      <dc:creator>danielchai</dc:creator>
      <dc:date>2013-10-08T17:29:27Z</dc:date>
    </item>
  </channel>
</rss>

