Chapter 7 Mode Entry Module (MC_ME)
MPC5602P Microcontroller Reference Manual, Rev. 4
164
Freescale Semiconductor
•
to wait until it is required to do something with no need to react quickly (e.g., allow for system
clock source to be re-started)
This mode can be used to stop all clock sources and thus preserve the device status. When exiting the
STOP0
mode, the 16 MHz internal RC oscillator clock is selected as the system clock until the target clock
is available.
7.4.3
Mode Transition Process
The process of mode transition follows the following steps in a pre-defined manner depending on the
current device mode and the requested target mode. In many cases of mode transition, not all steps need
to be executed based on the mode control information, and some steps may not be applicable according to
the mode definition itself.
7.4.3.1
Target Mode Request
The target mode is requested by accessing the ME_MCTL register with the required keys. This mode
transition request by software must be a valid request satisfying a set of pre-defined rules to initiate the
process. If the request fails to satisfy these rules, it is ignored, and the TARGET_MODE bit field is not
updated. An optional interrupt can be generated for invalid mode requests. Refer to
In the case of mode transitions occurring because of hardware events such as a reset, a SAFE mode request,
or interrupt requests and wakeup events to exit from low-power modes, the TARGET_MODE bit field of
the ME_MCTL register is automatically updated with the appropriate target mode. The mode change
process start is indicated by the setting of the mode transition status bit S_MTRANS of the ME_GS
register.
A RESET mode requested via the ME_MCTL register is passed to the MC_RGM, which generates a
global system reset and initiates the reset sequence. The RESET mode request has the highest priority, and
the MC_ME is kept in the RESET mode during the entire reset sequence.
The SAFE mode request has the next highest priority after reset. It can be generated either by software via
the ME_MCTL register from all software running modes including DRUN, RUN0…3, and TEST or by
the MC_RGM after the detection of system hardware failures, which may occur in any mode.
7.4.3.2
Target Mode Configuration Loading
On completion of the Target Mode Request step, the target mode configuration from the
ME_<target mode>_MC register is loaded to start the resources (voltage sources, clock sources, flashes,
pads, etc.) control process.
An overview of resource control possibilities for each mode is shown in . A ‘
’ indicates that a given
resource is configurable for a given mode.