kinetis k60 mqx lowpower example not working after pex generation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

kinetis k60 mqx lowpower example not working after pex generation

1,052 Views
jpderyck
Contributor II

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

Labels (1)
0 Kudos
Reply
5 Replies

838 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jean Paul,

The lowpower example is intended to use the MQX drivers to switch between the low-power modes, if you want to combine the Processor Expert drivers with MQX I would recommend you to use as reference the pe_demo project located in C:\Freescale\Freescale_MQX_4_1\demo\pe_demo.

Please also take a look to the chapter 8 of the following document:

http://cache.freescale.com/files/soft_dev_tools/doc/quick_ref_guide/FSL_MQX_getting_started.pdf

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

838 Views
jpderyck
Contributor II

Hi Carlos,

thank you for your quick answer

but the pe_demo that you suggest me has no low power switching mode functionality

I already use processor expert in my project, that is the problem (see my previous post)

do you confirm me that the only easy way to use the low power state switching from mqx driver is to avoid the use of processor expert ?

if this is the case, I will have to rewrite my test application in 'pure' mqx, that is not a problem, I am at the start of the application, for the moment, I am still validating the hardware of our custom board based on a k60

regards from Belgium

Jean-Paul

0 Kudos
Reply

838 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jean Paul,

Could you provide us with more information about your application? This way we can choose the best approach and decide if MQX, Processor Expert or Kinetis SDK is the best option.

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
Reply

838 Views
jpderyck
Contributor II

Hello Carlos,

thanks for your help

but I discovered that I was thinking wrong,

I can now make run the lowpower demo on the tower and on my own board with processor expert enabled with my own clock configuration

on my own board, i had also the problem that the serial port used as default (for debug printf) is not the same as for the tower

and I had to update it in init_sci.c (found the info on the forum)

regards

JP

0 Kudos
Reply

838 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jean Paul,

You're welcome, it is good to hear that you got the demo working with Processor Expert enabled. Please don't hesitate to post a question if you have any problem.

Best Regards!

Carlos Mendoza

Technical Support Engineer

0 Kudos
Reply