The _EntryPoint() function is called as the first function after the reset. This function is defined in the cpu module, usually Cpu.c, and provides necessary system initialization such as PLL and external bus. Sometimes it is necessary to do some special user initialization immediately after the cpu reset. Processor Expert provides a possibility to insert user code into the _EntryPoint() function. There is a User Initialization property in the build options tab of a processor component inspector defined for this purpose. Refer to the Component Inspector for details.
The first level of PE initialization in _EntryPoint contains:
- Disabling of the watchdog if required in Common settings/Watchdog item in Cpu component.
- Initialization of the fast interrupt 0 and fast interrupt 1 if they are used.
- Initialization of the PLL interrupt priority.
- MCM Core fault settings including interrupt priority based on OnCoreFault event enabling and processor interrupts/Interrupt Core Fault items in processor component.
- Initialization of the oscillators related pins based on settings of Clock properties in processor component.
- Initialization of the oscillators based on settings of Clock properties in processor component.
- If PLL is enabled, initialization and enabling of the PLL and PLL interrupt (based on Enabled speed modes/High speed mode properties in processor component and PLL event setting).
- Initialization of the processor clock sources based on Enabled speed modes/High speed mode/Input clock source property.
Now you are ready to do it yourself.