PE_low_level_init()

There is a second level of Processor Expert initialization PE_low_level_init() called at the beginning of the main() function. PE_low_level_init() function provides initialization of all components in project and it is necessary for proper functionality of the Processor Expert project.

The second level of PE initialization contains:

  1. Initialization of internal peripherals in the following order; based on settings of the Internal peripherals items in Cpu component
    1. Initialization of SIM module - except pin muxing. GPIOn clock gate is enabled if it's needed for pin muxing initialization. It is enabled even if it is disabled in Internal peripherals/System Integration Module/Clock gating control in processor component (it will be disabled later).
    2. Initialization of MCM module.
    3. Initialization of PMC module if enabled.
    4. Initialization of FMC module if enabled.
    5. Initialization of GPIOn modules (pin functional properties drive strength, slew rate except pull resistor and open drain).
  2. Initialization of the two's complement rounding and enabling saturation according to value of the Common settings/Saturation mode property in the processor component
  3. Initialization of the shadow registers based on Initialize shadow registers settings in the processor component.
  4. Common initialization
    • Initialization of the pin/signal muxing collected from all components in the project - enabling/disabling of the GPIOn clock gate is ensured automatically.
    • Initialization of the interrupt priorities collected from all components except some system interrupts like MCM Core fault PLL Error or PMC Low voltage.
    • Initialization of the unused I/O pins based on Initialize unused I/O pins properties in processor component.
    • Other initialization originated from some components (for example, Init_GPIO, BitIO,...)
  5. Disabling of the GPIOn clock gates if it is disabled in Internal peripherals/System Integration Module/Clock gating control in processor component in case it was temporarily enabled (see the first step).
  6. Initialization of components in a project (typically calling their Init method (for example, Init_ADC, ADC, Init_SPI, SynchroMaster,...).
  7. Required priority level setup based on Common settings/Initialization priority item in the processor component.

Now, you can do a second level of Processor Expert initialization.