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.

  1. The user implements a routine to disable the MPU-COMPAT bit.

  2. The user calls a PxuSetCompatMode() routine from inittcx library.

  3. The user calls PxInitializeBeforePxInit() PXROS-HR API routine while having the inittcx library part of the project. The inittcx library contains a code registering the PxuSetCompatMode() routine to run within PxInitializeBeforePxInit() 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.