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%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%AE%E3%83%91%E3%83%AF%E3%83%BC%E3%83%BB%E3%83%9E%E3%83%8D%E3%83%BC%E3%82%B8%E3%83%A1%E3%83%B3%E3%83%88%3ALLS%E3%83%A2%E3%83%BC%E3%83%89%E3%81%A8VLLS%E3%83%A2%E3%83%BC%E3%83%89%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%E7%9A%86%E3%81%95%E3%82%93%E3%80%81%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E3%83%87%E3%83%90%E3%82%A4%E3%82%B9%E3%81%AE%E6%B6%88%E8%B2%BB%E9%9B%BB%E5%8A%9B%E3%81%A8%E7%B5%84%E3%81%BF%E8%BE%BC%E3%81%BF%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E3%81%A7%E3%81%AE%E8%A8%AD%E8%A8%88%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E5%BD%B1%E9%9F%BF%E3%81%AF%E3%80%81%E4%BB%8A%E6%97%A5%E3%81%A7%E3%81%AF%E4%B8%80%E8%88%AC%E7%9A%84%E3%81%AA%E3%83%88%E3%83%94%E3%83%83%E3%82%AF%E3%81%A7%E3%81%99%E3%80%82Kinetis%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%AF%E3%80%81%E3%83%A6%E3%83%BC%E3%82%B6%E3%81%AE%E3%83%8B%E3%83%BC%E3%82%BA%E3%81%AB%E5%90%88%E3%82%8F%E3%81%9B%E3%81%A6%E3%81%95%E3%81%BE%E3%81%96%E3%81%BE%E3%81%AA%E3%83%91%E3%83%AF%E3%83%BC%E3%83%BB%E3%83%A2%E3%83%BC%E3%83%89%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE%E4%BD%8E%E9%9B%BB%E5%8A%9B%E3%83%A2%E3%83%BC%E3%83%89%E3%81%AE%E4%B8%AD%E3%81%AB%E3%81%AF%E3%80%81%E4%BD%8E%E3%83%AA%E3%83%BC%E3%82%AF%E3%82%B9%E3%83%88%E3%83%83%E3%83%97(LLS)%E3%83%A2%E3%83%BC%E3%83%89%E3%81%A8%E8%B6%85%E4%BD%8E%E3%83%AA%E3%83%BC%E3%82%AF%E3%82%B9%E3%83%88%E3%83%83%E3%83%97%E3%83%A2%E3%83%BC%E3%83%89(VLLS)%E3%81%A8%E3%81%84%E3%81%86%E6%9C%80%E3%82%82%E6%B6%88%E8%B2%BB%E9%9B%BB%E5%8A%9B%E3%81%AE%E5%B0%91%E3%81%AA%E3%81%84%E3%83%A2%E3%83%BC%E3%83%89%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E6%B7%BB%E4%BB%98%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AB%E3%81%AF%E3%80%81%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE%E3%83%A2%E3%83%BC%E3%83%89%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E7%B0%A1%E5%8D%98%E3%81%AA%E7%B4%B9%E4%BB%8B%2F%E8%AA%AC%E6%98%8E%E3%81%A8%E3%80%81%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE%E3%83%A2%E3%83%BC%E3%83%89%E3%81%AE%E3%81%84%E3%81%9A%E3%82%8C%E3%81%8B%E3%81%A7%E5%8B%95%E4%BD%9C%E3%81%99%E3%82%8B%E3%82%88%E3%81%86%E3%81%ABMCU%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E5%BF%85%E8%A6%81%E3%81%AA%E6%89%8B%E9%A0%86%E3%81%8C%E3%83%AA%E3%82%B9%E3%83%88%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AFFRDM-KL26Z%E3%81%AE%E3%83%99%E3%82%A2%E3%83%9C%E3%83%BC%E3%83%89%E3%83%BB%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E4%BB%96%E3%81%AEKinetis%E3%83%95%E3%82%A1%E3%83%9F%E3%83%AA%E3%81%AB%E3%82%82%E5%90%8C%E3%81%98%E5%8E%9F%E5%89%87%E3%81%8C%E9%81%A9%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E3%81%BE%E3%81%9F%E3%80%81KDS%20v3.2%20%E7%94%A8%E3%81%AE%202%20%E3%81%A4%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%8C%E5%8F%82%E7%85%A7%E7%94%A8%E3%81%AB%E6%B7%BB%E4%BB%98%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E3%81%8A%E5%BD%B9%E3%81%AB%E7%AB%8B%E3%81%A6%E3%82%8C%E3%81%B0%E5%B9%B8%E3%81%84%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%81%8A%E9%A1%98%E3%81%84%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%A2%E3%82%A4%E3%82%B6%E3%83%83%E3%82%AF%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1106525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EKinetis%20L%E3%82%B7%E3%83%AA%E3%83%BC%E3%82%BA%E3%83%BB%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
評価なし
バージョン履歴
最終更新日:
‎09-15-2016 01:56 PM
更新者: