The _EntryPoint() function is called as the first function after the reset. This function is defined in the Cpu_Init.c module and provides necessary system initialization such as PLL and external bus.
The first level of PE initialization in _EntryPoint contains:
- Setting either normal or fast run mode based on Clock settings (OCCS)/Dual speed clock property in processor component.
- Disabling of the watchdog if required in Common settings/Watchdog item in processor component.
- Initialization of the fast interrupt 0 and fast interrupt 1 if they are used.
- Initialization of the PLL interrupts priority.
- Initialization of the external reference clock source (including initialization of related pins) based on settings of Clock settings (OCCS)/External reference clock properties in processor component.
- Initialization of the external reference clock source (including initialization of related pins) based on settings of Clock settings (OCCS)/External reference clock properties in processor component.
- Initialization of the internal oscillators based on settings of Clock settings (OCCS)/Internal oscillator properties in processor component.
- Selection of the CPU clock source based on Clock settings (OCCS)/Clock configurations/Clock configuration 0/Input clock source property in processor component.
- If PLL is enabled, initialization and enabling of the PLL and PLL interrupt based on Clock settings (OCCS)/Clock configurations/Clock configuration 0 properties in processor component and PLL event setting.
- Initialization of peripheral clock rates and clock registers protection based on Clock settings (OCCS)/Clock configurations/Clock configuration 0/Peripheral clock rates and Clock settings (OCCS)/Clock protection properties in processor component.