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:
- Initialization of all I/O pins which are not used by any component based on Common settings/Initialize unused I/O pins properties in processor component.
- Initialization of the two's complement rounding and enabling saturation according to value of the Common settings/Saturation mode property in the processor component.
- Initialization of the shadow registers based on Initialize shadow registers settings in the processor component.
- Initialization of the reset pin based on Common settings / reset pin property in the processor component.
- OnReset() event call if enabled.
- Common initialization via Common_Init() function placed in generated CPU module.
- Common initialization of registers which initialization is required for proper functionality of components in the project (for example, synchronization between components, functionality common for different peripherals of the same type etc.).
- Common initialization of registers which would be initialized by Peripheral Initialization Component if component was in the project.
- Peripheral Initialization Components initialization via Peripherals_Init() function placed in static Peripherals_Init.c module.
- Initialization of the rest of components via Components_Init() function placed in generated CPU module.
- Required priority level setup based on Common settings/Initialization priority item in the processor component.