KL03Z: Getting into VLLS0 from VLPR?

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

KL03Z: Getting into VLLS0 from VLPR?

跳至解决方案
1,405 次查看
sarastout-grand
Contributor III

Hello,

I'm having trouble getting from VLPR mode, where I stay most of the time, to VLLS0 mode. However, I read in the user's manual that the PMPROT register can only be written once. I would need to write to it to get to VLPR and then again to get into VLLS0.

Is there a way around this or am I misunderstanding the manual?

Thanks,

Sara

标签 (1)
0 项奖励
回复
1 解答
1,331 次查看
mjbcswitzerland
Specialist V

Sara

PMPROT is a protection register and not a control register. If you want to 'allow' all low power modes you can simply write it once after each reset to allow all of the modes that you will be using.

Eg.

MC_PMPROT = (MC_PMPROT_AVLP | MC_PMPROT_ALLS | MC_PMPROT_AVLLS1 | MC_PMPROT_AVLLS2 | MC_PMPROT_AVLLS3); // allow all low power modes

Regards

Mark

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,332 次查看
mjbcswitzerland
Specialist V

Sara

PMPROT is a protection register and not a control register. If you want to 'allow' all low power modes you can simply write it once after each reset to allow all of the modes that you will be using.

Eg.

MC_PMPROT = (MC_PMPROT_AVLP | MC_PMPROT_ALLS | MC_PMPROT_AVLLS1 | MC_PMPROT_AVLLS2 | MC_PMPROT_AVLLS3); // allow all low power modes

Regards

Mark

0 项奖励
回复
1,331 次查看
sarastout-grand
Contributor III

Thanks Mark! I wasn't thinking about it that way. That makes a lot of sense!

Sara

0 项奖励
回复