MPC5604B/C Microcontroller Reference Manual, Rev. 8
Freescale Semiconductor 27
1.7.3 Software design
Certain modules provide system integration functions, and other modules (such as timers) provide specific
functions.
From reset, the modules involved in configuring the system for application software are:
• Boot Assist Module (BAM) — determines the selected boot source
• Reset Generation Module (MC_RGM) — determines the behavior of the MCU when various reset
sources are triggered and reports the source of the reset
• Mode Entry Module (MC_ME) — controls which operating mode the MCU is in and configures
the peripherals and clocks and power supplies for each of the modes
• Power Control Unit (MC_PCU) — determines which power domains are active
• Clock Generation Module (MC_CGM) — chooses the clock source for the system and many
peripherals
After reset, the MCU will automatically select the appropriate reset source and begin to execute code. At
this point the system clock is the 16 MHz FIRC oscillator, the CPU is in supervisor mode and all the
memory is available. Initialization is required before most peripherals may be used and before the SRAM
can be read (since the SRAM is protected by ECC, the syndrome will generally be uninitialized after reset
and reads would fail the check). Accessing disabled features causes error conditions or interrupts.
A typical startup routine would involve initializing the software environment including stacks, heaps,
variable initialization and so on and configuring the MCU for the application.
The MC_ME module enables the modules and other features like clocks. It is therefore an essential part
of the initialization and operation software. In general, the software will configure an MC_ME mode to
make certain peripherals, clocks, and memory active and then switch to that mode.
Chapter 6, Clock Description, includes a graphic of the clock architecture of the MCU. This can be used
to determine how to configure the MC_CGM module. In general software will configure the module to
enable the required clocks and PLLs and route these to the active modules.
After these steps are complete it is possible to configure the input/output pins and the modules for the
application.
1.7.4 Other features
The MC_ME module manages low power modes and so it is likely that it will be used to switch into
different configurations (module sets, clocks) depending on the application requirements.
The MCU includes two other features to improve the integrity of the application:
• It is possible to enable a software watchdog (SWT) immediately at reset or afterwards to help
detect code runaway.
• Individual register settings can be protected from unintended writes using the features of the
Register Protection module. The protected registers are shown in Chapter 29, Register Protection.
Other integration functionality is provided by the System Status and Configuration Module (SSCM).