Power Management on Kinetis MCUs: LLS and VLLS modes

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

标签 (1)
附件
评论

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1106525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKinetis%20MCU%20%E4%B8%8A%E7%9A%84%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86%EF%BC%9ALLS%20%E5%92%8C%20VLLS%20%E6%A8%A1%E5%BC%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1106525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E8%AE%BE%E5%A4%87%E7%9A%84%E5%8A%9F%E8%80%97%E4%BB%A5%E5%8F%8A%E5%B5%8C%E5%85%A5%E5%BC%8F%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1%E7%9A%84%E5%BD%B1%E5%93%8D%E6%98%AF%E5%BD%93%E4%BB%8A%E7%9A%84%E5%B8%B8%E8%A7%81%E8%AF%9D%E9%A2%98%E3%80%82Kinetis%20MCU%20%E6%8F%90%E4%BE%9B%E4%B8%8D%E5%90%8C%E7%9A%84%E7%94%B5%E6%BA%90%E6%A8%A1%E5%BC%8F%E4%BB%A5%E6%BB%A1%E8%B6%B3%E7%94%A8%E6%88%B7%E7%9A%84%E9%9C%80%E6%B1%82%E3%80%82%E5%9C%A8%E8%BF%99%E4%BA%9B%E4%BD%8E%E5%8A%9F%E8%80%97%E6%A8%A1%E5%BC%8F%E4%B8%AD%EF%BC%8C%E6%88%91%E4%BB%AC%E5%8F%AF%E4%BB%A5%E6%89%BE%E5%88%B0%E6%9C%80%E4%BD%8E%E7%9A%84%E5%8A%9F%E8%80%97%E6%A8%A1%E5%BC%8F%EF%BC%9A%E4%BD%8E%E6%B3%84%E6%BC%8F%E5%81%9C%E6%AD%A2%E6%A8%A1%E5%BC%8F%EF%BC%88LLS%EF%BC%89%E5%92%8C%E8%B6%85%E4%BD%8E%E6%B3%84%E6%BC%8F%E5%81%9C%E6%AD%A2%E6%A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3E%3CLINGO-LABS%20id%3D%22lingo-labs-1106525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EKinetis%20L%E7%B3%BB%E5%88%97MCU%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
无评分
版本历史
最后更新:
‎09-15-2016 01:56 PM
更新人: