iLLD_TC27xD
1.0
|
![]() |
The startup driver is responsible for initializing the basic features of microcontroller to bring it up to the user functions. In framework these functions are called as "CoreX_main".
In TC27X controllers, CPU0 is master controller which is booted from reset. IfxCpu_CStart driver provides following functionalities and they are listed in the order of their execution.
1) Execute pre-initialization hook, which is user configurable. Ifx_Cpu_ConfigStartupPreInitHook
2) Setup user stack pointer for the CPU core
3) Set program/data cache bypass to configuration defined settings. Refer Ifx_Cpu_CStart_ConfigEnableCache.
4) Set base address for trap vector and interrupt vector for the CPU core
5) Set interrupt stack pointer
6) Initialize the base pointers for the small data area registers for CPU core
7) Initialize the CSA for CPU core
8) Do the C initialization to initialize the global variables etc.
9) Initialize the clock system to configuration defined settings. Ifx_Scu_Ccu_ConfigClock
10) Start remaining cores if they configuration setting request them to be enabled. Ifx_Cpu_CStart_ConfigEnableCores
11) Call user function "CoreX_main"
If the application/ demo example need some activity other than above defined functionalities, user can configure the function which is called before any other initialization is executed. Example of such activity is testing the CSA and STACK.
Following are the steps to be done to configure user defined activity which is needed before startup sequence.
This definition shall be as user defined code (Generally in DemoApps folder).
Considerations:
Example code in a user defined file eg. Ifx_preInitHook.h, placed under folder/subfolder: 0_AppSw/Tricore/DemoApp:
Create a file for configuring the hook. For example, Ifx_Cfg_CStart.h at ../0_Src/0_AppSw/Config/Tricore (or in DemoApp folder)