Power Management on Kinetis MCUs: LLS and VLLS modes

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

Power Management on Kinetis MCUs: LLS and VLLS modes

Power Management on Kinetis MCUs: LLS and VLLS modes

Hello All,

Power consumption of devices and implications around designing on embedded systems is a common topic nowadays. Kinetis MCUs offer different power modes to fit user's needs. Among these low power modes, we can find the lowest consumption modes: Low-Leakage Stop (LLS) and Very Low-Leakage Stop modes (VLLS).

Attached document provides a brief introduction/explanation on these modes and lists the steps needed to configure MCU to operate in any of these modes. It is a bare-board project for FRDM-KL26Z but same principle applies to other Kinetis families. Also, two projects for KDS v3.2 are attached for reference.

I hope you can find them useful!

Regards,

Isaac

Labels (1)
Attachments
Comments

Hi Isaac,

Thank you very much for creating this very helpful doc and code!

I am trying to port to the frdm-k22f and notice that the header file is different for register accessess.  I have cleard most of the errors but am stuck with this error in the gpio.c file.  

I had to change this line to the following:

static PORT_MemMapPtr g_portPtrs[] = PORT_BASE_PTRS;

Changed to:
static PORT_Type g_portPtrs[] = PORT_BASE_PTRS;

But get an error on this line which I do not understand:

 g_portPtrs[port]->PCR[pin] = PORT_PCR_MUX(1);

Error:

../source/gpio.c:75:25: error: invalid type argument of '->' (have 'PORT_Type')
g_portPtrs[port]->PCR[pin] = PORT_PCR_MUX(1);

I will upload working code once I get it running in case it is useful to anyone else.  

Edit:  Found the problem to be that the definition needed to be deferenced as below:

static PORT_Type * g_portPtrs[] = PORT_BASE_PTRS;

Also see we had overlapping posts.  Thanks!

Hello,

PORT_MemMapPtr is a pointer to structure and PORT_Type is only the structure. You need to define an array of pointer to structures, in this case, you will need to replace:

   static PORT_Type g_portPtrs[] = PORT_BASE_PTRS;

by:

   static PORT_Type *g_portPtrs[] = PORT_BASE_PTRS;

And it should work well!

Regards,

Isaac

No ratings
Version history
Last update:
‎09-15-2016 01:56 PM
Updated by: