User manual
 

Reset Scenario with PE for ColdFire and Kinetis MCUs


Figure 1 - Reset sequence diagram with Processor Expert

_startup()

The _startup() function is called as the first function after the reset. The _startup() function initializes the stack pointer, calls the __initialize_hardware() function and continues with initialization of the enviroment (such as memory initialization). At the end of the _startup() function the main() function is called.

__initialize_hardware()

The __initialize_hardware() function is called from the _startup function after an initialization of the stack pointer. 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 __initialize_hardware() function. There is a User Initialization property in the build options tab of a CPU component inspector defined for this purpose. See chapter Component Inspector for details.

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.

OnReset event

The user can write the code that will be invoked from the PE_low_level_init() function after Processor Expert internal initialization, but before the initialization of individual components. Thus, the user should expect that peripherals are not completely initialized yet. This event can be enabled/disabled in the CPU component inspector's events page.