Hi,
I am working with kinetis L 46 micro-controller. My application is battery powered so that I want to optimize power as much as possible...
All I need to do is switch between LLS and Vlpr mode via RUN. I can able to enter into lls mode and rtc 1 sec interrupt will wake up the processor from lls mode and it will go to the Run mode and I'm changing the mcg mode to BLPI and turning OFF the clock monitor.
But PMC REGONS bit is not turning 0.
Is there anything else that I need to do.
Please give me any suggestions.
Best Regards,
Shabana
Hi Shabana,
The first that comes to mind for me is that maybe your clock settings are still not quite right. BLPI is a valid mode to enter VLPR from but you still need to make sure that the Bus/Flash clock is set to 800kHz or less (assuming you are executing code from Flash). If you are not executing your code from Flash, you may be able to get away with a 1 MHz Bus/Flash clock. Can you tell me what divider values you are using?
Also, I would check that the Allow Very Low Power bit in the SMC power mode protection register (SMC_PMPROT[AVLP]) is set. If it is not, you won't be allowed to enter VLPR. Is this bit set?
Please let me know if this helps. :smileyhappy:
Thanks,
Chris
Hi Chris,
You are correct (SMC_PMPROT[AVLP]) bit is not set. I know it's a write once bit I'm not writing it before this is the first time I'm writing this bit.. so why it is not setting as 1.
Best regards,
Shabana
Hi Shabana,
Have you written the SMC_PMPROT register with any value before attempting to write the AVLP bit? If so, this would explain why the bit is not setting. This should be the only reason this bit would be writable.
Regards,
Chris
Hi Chris,
Yes before entering vlpr mode I'm going to lls mode that time i'm writing into SMC_PMPROT register... Thank u so much.. now my problem is solved.. :smileyhappy: :smileyhappy:
Best Regards,
Shabana