This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
A question about entering and exiting LPM 4 and LPM4.5
In active mode, I have HFXT and LFXT on
FLL source = HFXT 4MHz
MCLK and SMCLK source = DCO FLL set to 24MHz
ACLK source = LFXT 32.768KHz
Question
Before entering LPM4, do I need to write the code to turn off HFXT and LFXT and set
MCLK, SMCLK and ACLK source = REFCLK or VLO, before going to _BIS_SR(LPM4_bits + GIE);? Or does the BIS_SR line take care of the clock switching automatically?
Also, do I have to do the same thing before entering LPM4.5
When exiting from LPM4, i'm going to use GPIO input using a pushbutton
PortISR()
{
Debounce()
__bic_SR_register_on_exit(LPM4_bits);
ConfigureClocksforActiveMode();
}
Are the steps above correct? Do I need to configure the clocks back to how I had set it up in active mode before I exit the ISR?
In the case of LPM4.5, I understand that a reset occurs so I assume my clocks will be set to active in the initialization phase of my code -> is my understanding correct here or am I missing something?
Thanks.
AJ
**Attention** This is a public forum