Practical Hints
The routine _PxInit_Start_Cores in the library supporting different startup variants provides an extension of the PXROS-HR kernel routine.
To replace the default kernel routine with the one from the library means to include the inittcx library before the PXROS-HR kernel library in the build command.
Disabling MPU Compatibility mode
The MPU compatibility is active after the reset in AURIX architecture to keep backward compatibility with legacy SW running on older TriCore architecture.
However, the advice is to disable the compatibility mode to enhance safety robustness by adding another level of protection to critical registers.
There are three options for disabling the compatibility mode after the reset.
-
The user implements a routine to disable the
MPU-COMPATbit. -
The user calls a
PxuSetCompatMode()routine frominittcxlibrary. -
The user calls
PxInitializeBeforePxInit()PXROS-HR API routine while having theinittcxlibrary part of the project. Theinittcxlibrary contains a code registering thePxuSetCompatMode()routine to run withinPxInitializeBeforePxInit()function.
MPU configuration with MPU compatibility OFF
In case of a disabled MPU compatibility, the MPU regions in the PXROS-HR init structure must cover all access needs of the startup and application code running before PxInit() function call.
The reason is that the MASTER_CORE activates MPU protection for all cores even they are still in HALT mode. Once they start, they run under MPU protection from the very first instruction of the crt0 startup code.