Reset Scenario With Processor Expert

 

Figure 1 - Reset sequence diagram

Figure 1 describes a typical initialization scenario with Processor Expert after the cpu reset.

_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 like PLL, external bus, etc...
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 bean inspector defined for this purpose. See chapter Bean Inspector for details.

C startup module

The C startup module is called at the end of the _EntryPoint() function. The C startup module provides necessary initialization of the stack pointer, runtime libraries, etc... At the end of the C startup module 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 beans in project and it is necessary for proper functionality of the Processor Expert project.

OnReset event

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


 

 

[top of page]