I try to add a sleep function to reduce the MKL27Z644 power current. Code as below:
SMC->PMPRORT =-1; //added for sleep mode
sleep(); //enter sleep for LPUART interrupt to wake up into rum mode.
SMC->PMCTRL = BIT6; //RUNM VLPR;
It is not work at all. I don't know how to make this to work. I could not add the line 'asm("WFI") that disables LPUART interrupt.