TWR-K60N512-KEIL Freescale Semiconductor, TWR-K60N512-KEIL Datasheet - Page 56

no-image

TWR-K60N512-KEIL

Manufacturer Part Number
TWR-K60N512-KEIL
Description
K60N512 Keil Tower Kit
Manufacturer
Freescale Semiconductor
Series
Kinetisr
Type
MCUr

Specifications of TWR-K60N512-KEIL

Rohs Compliant
YES
Contents
4 Boards, Documentation, DVD
Peak Reflow Compatible (260 C)
Yes
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
Freescale Tower System, K60N512
Using the mode controller
The MCU could also wakeup from a user input. This could be hitting a button, a touch of
a capacitive sensor, the rise or fall of an analog signal from a sensor feeding the
comparator. To enable these sources please refer to the LLWU section 3 for configuration
details.
The example codes for MC are available from the Freescale Web site
www.freescale.com.
5.2.2.1 MC code example and explanation
There are two registers in the mode controller: the PMPROT register and the Power
Management Protection register. This is a write once register after a reset. This means
that once written all subsequent writes are ignored. In our example system above, our two
basic modes of operation are run mode and LLS mode. If we do not want the MCU to be
in any other low power mode we would want to write the ALLS bit in the PMPROT
register.
MC_PMPROT = MC_PMPROT_ALLS_MASK;
This write allows the MCU to enter LLS only. It is then no longer possible to enter any
other low power mode.
Once the PMPROT register has been written, the write to the PMCTRL control register
sets the mode entry and exit selection. For our example, entry into LLS mode would be
enabled with this write.
MC_PMCTRL =
MC_PMCTRL_LPLLSM(0x3));
// set LPLLSM = 0b11
5.2.2.2 Entering low leakage stop (LLS) mode
Once the previous two setup steps have been done the low power stop mode would be
entered with a write to the SCR register in the core control logic to set the SLEEPDEEP
bit.
SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;
When the WFI instruction is executed the mode controller will step through the low
power entry state machine making sure all of the modules are ready to enter the low
power mode. If, for instance the UART is finishing a serial transmission it would hold off
the entry into the LLS until the transmission was completed. In C the syntax to execute
the core instruction WFI is:
asm("WFI");
Kinetis Quick Reference User Guide, Rev. 0, 11/2010
56
Freescale Semiconductor

Related parts for TWR-K60N512-KEIL