K22 Turn Off All I/O

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K22 Turn Off All I/O

992 Views
burgeh
Contributor IV

Greetings,

I am using the MK22FN256VLH with KDS v3.2 and Processor Expert.

I am setting the Micro controller to sleep via  Cpu_SetOperationMode(DOM_SLEEP, NULL, NULL);  However, I am still get a lot more current then I would be expecting while it sleeps. Do I need to set all I/O pins possible to low? If so, is there a simple masking way to do this?

Thanks!

0 Kudos
4 Replies

697 Views
miduo
NXP Employee
NXP Employee

Hello,

Actually  what you see is normal. It can been know from the manual that the SLLEP mode is equivalent to wait mode and in this case  peripherals is functional while the core is in sleep mode, NVIC remains sensitive to interrupts; peripherals continue to be clocked.

Please use SLEEP DEEP mode instead which " Places chip in static state. Lowest power mode that retains all registers while maintaining LVD protection. NVIC is disabled; AWIC is used to wake up from interrupt; peripheral clocks are stopped."

697 Views
burgeh
Contributor IV

What is AWIC? I currently use a Low Power timer and once that reaches the value I try and wakeup. I have issues with the SLEEP DEEP mode.  

The code using KDS with Processor Expert looks like below:

LPTMR_PDD_WriteCompareReg(LPTMR0_DEVICE, 499);
LPTMR0_CSR |= 1;  //enable timer
//WAIT1_Waitms(200);
Cpu_SetOperationMode(DOM_SLEEP, NULL, NULL); //works if use DOM_WAIT or DOM_SLEEP \
(DOM_STOP fails to wake except by reset)
LPTMR0_CSR &= ~1; //disable and reset timer
0 Kudos

697 Views
burgeh
Contributor IV

Any update?

0 Kudos

697 Views
burgeh
Contributor IV

Is there anything I can reference that would lead me to some commands that could do this? Even if it is one port at a time?

0 Kudos