AnsweredAssumed Answered

kinetis k60 mqx lowpower example not working after pex generation

Question asked by Jean-Paul Deryck on Jul 7, 2015
Latest reply on Jul 13, 2015 by Carlos_Mendoza

Hello,

I use the twrk60n512 and mqx 4.1 and try the example named 'lowpower' in mqx folder

when processor expert has not be used, it runs well

 

when I generate something with pex, it don't work anymore, this is because

in file init_lpm.c we can see

 

 

#ifndef PE_LDD_VERSION

 

const LPM_CPU_OPERATION_MODE LPM_CPU_OPERATION_MODES[LPM_OPERATION_MODES] =

{

   // LPM_OPERATION_MODE_RUN

    {

        LPM_CPU_POWER_MODE_RUN,                     // Index of predefined mode

        0,                                          // Additional mode flags

        0,                                          // Mode wake up events from pins 0..3

        0,                                          // Mode wake up events from pins 4..7

        0,                                          // Mode wake up events from pins 8..11

        0,                                          // Mode wake up events from pins 12..15

        0                                           // Mode wake up events from internal input sources

    },

    // LPM_OPERATION_MODE_WAIT

    {

        LPM_CPU_POWER_MODE_VLPR,                    // Index of predefined mode

        0,                                          // Additional mode flags

        0,                                          // Mode wake up events from pins 0..3

        0,                                          // Mode wake up events from pins 4..7

        0,                                          // Mode wake up events from pins 8..11

        0,                                          // Mode wake up events from pins 12..15

        0                                           // Mode wake up events from internal input sources

    },

    // LPM_OPERATION_MODE_SLEEP

    {

        LPM_CPU_POWER_MODE_WAIT,                    // Index of predefined mode

        LPM_CPU_POWER_MODE_FLAG_SLEEP_ON_EXIT,      // Additional mode flags

        0,                                          // Mode wake up events from pins 0..3

        0,                                          // Mode wake up events from pins 4..7

        0,                                          // Mode wake up events from pins 8..11

        0,                                          // Mode wake up events from pins 12..15

        0                                           // Mode wake up events from internal input sources

    },

    // LPM_OPERATION_MODE_STOP

    {

        LPM_CPU_POWER_MODE_LLS,                     // Index of predefined mode

        0,                                          // Additional mode flags

        0,                                          // Mode wake up events from pins 0..3

        0,                                          // Mode wake up events from pins 4..7

        0,                                          // Mode wake up events from pins 8..11

        0,                                          // Mode wake up events from pins 12..15

        LLWU_ME_WUME0_MASK                          // Mode wake up events from internal input sources - LPT

    }

};

 

#else

 

const LPM_CPU_OPERATION_MODE LPM_CPU_OPERATION_MODES[1] = {0};

 

#endif

 

and when generating somethng with pex, the PE_LDD_VERSION is defined in file PE_types.h

so the definition above is reduced to LPM_CPU_OPERATION_MODES[1] = {0}

and the example does not work anymore

 

so what is the way to make it work in that case ?

 

best regards

JP

Outcomes