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
Solved! Go to Solution.
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
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
Thanks Mark! I wasn't thinking about it that way. That makes a lot of sense!
Sara