User manual
 

Reset Scenario with PE for HC(S)08, RS08, 56800E


Figure 1 - Reset sequence diagram with Processor Expert

_EntryPoint function

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 CPU component inspector defined for this purpose.

C startup function

The C startup function in the C startup module is called at the end of the _EntryPoint() function. It provides a necessary initialization of the stack pointer, runtime libraries, and so on. At the end of the C startup function the main() function is called.

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 the 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.

For details on 56800EX family, please see the section Reset scenario for 56800EX.