PXROS-HR Operating System: Multicore Startup Application Note

PXROS-HR Operating System: Multicore Startup Application Note

1. Terms & Abbreviations

BSP

Board Support Package

EVB

Evaluation Board

CSA

Context Save Area

MPU

Memory Protection Unit

PC

Program counter

2. Introduction

The document describes multicore aspects of PXROS-HR initialization phase before the InitTask starts running. The emphasis is on the description of the PXROS-HR master core strategy, the handling of MPU protection, and a startup of inactive cores.

The document provides in the end a list of supportive examples available for download.

This guide does not describe the startup phase like "C" environment settings and hardware platform initialization.

3. Key Elements

Several elements play a vital role in the multicore startup process of the PXROS-HR operating system. Their combination determines the startup flow together with a selection of optional libraries providing the corresponding implementation.

3.1. AURIX MPU compatibility mode (MPU-COMPAT)

AURIX architecture introduces additional protection against an unintended modification of selected critical registers through a so-called Safety Watchdog EndInit protection where the write access to these registers requires a particular Unlock-Modify-Lock sequence in the hardware Safety Watchdog module. This sequence represents a potential issue in a multicore environment.

The AURIX architecture contains the COMPAT register, allowing to disable the Safety Watchdog EndInit Protection of critical registers to keep backward compatibility with older TriCore architectures.

The compatibility mode has an impact on multicore PXROS-HR operating system because it controls the protection level for the core’s MPU enable-disable bit in SYSCON register that belongs among such critical registers.

MPU Compatibility ON (MPU-COMPAT=ON)

  • The MPU enable/disable operation in SYSCON register is not under Safety Watchdog EndInit Protection

  • The PXROS-HR startup does not need to access Safety Watchdog module

  • Each PXROS-HR kernel instance enables its core MPU system independently

MPU Compatibility OFF (MPU-COMPAT=OFF)

  • Core’s MPU enable/disable in SYSCON register needs Safety Watchdog EndInit Protection handling

  • Only one core shall control the Safety Watchdog module

  • Only one core shall enable MPU system on all other cores

3.2. AURIX Core Execution state

The core in AURIX architecture can be in different states during the microcontroller runtime.

  • By default, there is one active core after the hardware reset, the other inactive cores are in the HALT mode. Once the core leaves HALT mode, it cannot enter it again until the next reset.

  • Active cores are in the RUN state where they execute the code.

  • Due to various reasons, the active state can be switched to the IDLE state in which the core does not execute any code and waits for its activation.

3.3. PXROS-HR Master Core

The PXROS-HR configuration requires a definition of MASTER_CORE symbol controlling:

  • which core starts other inactive cores

  • which core handles Safety Watchdog module

  • which core configures and enables MPU protection of inactive cores before starting them in case of disabled MPU compatibility (MPU-COMPAT = OFF).

3.4. PXROS-HR kernel startup routines

The PXROS-HR kernel supports only a limited startup variant:

  • The kernel supports only MASTER_CORE=0, which is the reset core in AURIX architecture.

  • The kernel can activate another core only from the HALT state.

  • The kernel supports both MPU Compatibility modes

Other startup scenarios, like to start the PXROS-HR initialization from a different MASTER_CORE or to activate inactive cores being in IDLE mode, require user-specific implementation.

3.5. PXROS-HR Init Utility Library

The inittcx library is part of the utility package distributed within the PXROS-HR install package and contains supportive hardware related routines to help the user with other startup variants than the one implemented in the PXROS-HR kernel.

The inittcx library routines:

PxuSetCompatMode

PxuSetCompatMode clears the bits RM and SP in the COMPAT register to disable the TC-V1.3 compatible behavior. In this mode, the fields PSW.RM of the PSW register are not restored on RET and the SYSCON registers of all cores are safety EndInit protected. PxuSetCompatMode is only executed on the MASTER_CORE.

PxuSetCoreMode

PxuSetCoreMode sets the mode of the requested core to IDLE or RUN. If the requested core is in HALT state, the PC of the core is initialized to the requested start address and the core is activated.

PxuStartMasterCore

PxuStartMasterCore activates the MASTER core. If the MASTER and STARTUP core is different, the master core is started. The startup core enters the IDLE state to be reactivated by the MASTER core after initialization. PxuStartMasterCore shall only be executed on the STARTUP core 0.

_PxInit_Start_Cores

If the SYSCON register is safety EndInit protected, all other CPUs are started with protection enabled. Therefore the function _PxInit_InitMpu is called to initialize the MPU of the core to start.

_PxInit_InitMpu

If the SP-bit in the COMPAT-Register is cleared, _PxInit_InitMpu initializes the MPU of the requested core from the specification in PxInitSpec. The SYSCON register of the core is set to:

  • PROTEN - Memory Protection enabled

  • U1_IED - User-1 instruction execution disable. The User-1 tasks ability to disable and enable interrupts is disabled.

NOTE: The underscore functions in the inittcx library override the default PXROS-HR kernel implementation to extend their default capability. The inittcx library must precede the PXROS_HR kernel library in the library link to make it work.

4. Multicore Startup Variants

In all cases of a multicore PXROS-HR startup process

  • the MASTER_CORE shall execute PxInit() function first while other cores are in their inactive state, either HALT or IDLE.

  • The MASTER_CORE activates other cores during PxInit() function within the _PxInit_Start_Cores() routine, provided either by kernel library or by inittcx library.

4.1. Core MPU compatibility enabled

This mode is a default reset state on AURIX architecture, meaning that each core can enable/disable its core MPU protection without a need to access Safety Watchdog module.

In this case, the only task for the MASTER_CORE is to activate other cores and let the core MPU system enable as part of their duties.

pxros cpu0 compat on
Fig. 1. MPU-COMPAT=ON (MPU not Safety Watchdog EndInit protected)

MASTER_CORE activities

  • Start inactive cores

  • Program its core MPU regions according to their PXROS-HR init structure

  • Enable its core MPU system

  • Continue PxInit() till InitTask

OTHER Core activities

  • Program their core MPU regions according to their PXROS-HR init structure

  • Enable their core MPU system

  • Continue PxInit() till InitTask

4.2. Core MPU compatibility disabled

Having disabled MPU compatibility, only one core shall enable the MPU system under Safety Watchdog EndInit Protection for all cores in the microcontroller to keep the module handling multicore safe.

In the PXROS-HR operating system, it is the kernel instance running on the MASTER_CORE that configures and enables the MPU system for inactive cores before activating them.

pxros cpu0 compat off
Fig. 2. MPU-COMPAT=OFF (MPU is Safety Watchdog EndInit protected)

MASTER_CORE activities

  • Configure MPU regions according to their PXROS-HR init structure on each core

  • Enable MPU system on each core

  • Start inactive cores

  • Continue PxInit() till InitTask

OTHER Core activities

  • Program MPU regions according to PXROS-HR init structure

  • Continue PxInit() till InitTask

4.3. Starting from other than Reset core

The case when MASTER_CORE != 0, the application code running on the reset core (CORE=0) must activate the desired MASTER_CORE first and switch the current core to IDLE. The reset core remains in IDLE mode until PxInit() running on MASTER_CORE activates it again. The inittcx library provides a supportive function PxuStartMasterCore to activate MASTER_CORE from the reset core. Part of the function is to switch the current core to IDLE mode.

PxInit() function handles other cores MPU protection in the same style as described above having two variants depending on MPU compatibility mode set.

pxros cpu1 compat on
Fig. 3. MASTER_CORE=1, MPU-COMPAT=ON (MPU not Safety Watchdog EndInit protected)
pxros cpu1 compat off
Fig. 4. MASTER_CORE=1, MPU-COMPAT=OFF (MPU is Safety Watchdog EndInit protected)

5. Practical Hints

5.1. Using routines from inittcx library

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.

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

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

6. A use of Init Utility library in startup variants

Different startup variant might require use of the supportive inittcx library from delivered utilities or user-specific implementation due to limited startup support provided by the PXROS-HR kernel.

Following table depicts startup variants and the need of having the inittcx library in the project. An entry in bold means a change from the microcontroller default Reset state.

Tab. 1. Startup variants and the Init Utility library
MASTER CORE MPU COMPAT OTHER CORE PXROS-HR kernel support inittcx library need

== 0

== ON

== HALT

Yes

No

== 0

== ON

== IDLE

No

Yes

== 0

== OFF

== HALT

Yes

No / Yes*

== 0

== OFF

== IDLE

No

Yes

!= 0

== ON

== HALT

No

Yes

!= 0

== ON

== IDLE

No

Yes

!= 0

== OFF

== HALT

No

Yes

!= 0

== OFF

== IDLE

No

Yes

* inittcx library used for disabling the compatibility mode.

7. Supportive Examples

There is a set of supportive examples demonstrating described startup variants available for download, use HighTec Content Manager in HighTec IDE for their search and download.

The examples are derived from the PXROS-HR base example tc297-pxros-bsp-example. See PXROS-HR BSP Guide [1] for more details about the PXROS-HR part of the examples.

Tab. 2. Supportive examples for PXROS-HR multicore startup variants
Multicore Startup Variant Diagram Example

pxros cpu0 compat on

tc297-pxros-bsp-example

pxros cpu0 compat off

tc297-pxros-bsp-cpu0-mpu-compat-off-example

pxros cpu1 compat on

tc297-pxros-bsp-cpu1-mpu-compat-on-example

pxros cpu1 compat off

tc297-pxros-bsp-cpu1-mpu-compat-off-example

Document References

[1] "PXROS-HR BSP Example - PXROS Guide" , HighTec EDV Systeme GmbH, 2019

Document history

Version Date Changes to the previous version

1.0

July 2019

Initial version

2.0

February 2026

Change tc2xsys to Init Utility

Disclaimer

 
 
 

Please Read Carefully:

This document contains descriptions for copyrighted products that are not explicitly indicated as such. The absence of the TM symbol does not infer that a product is not protected. Additionally, registered patents and trademarks are similarly not expressly indicated in this document.

The information in this document has been carefully checked and is believed to be entirely reliable. However, HighTec EDV-Systeme GmbH assumes no responsibility for any inaccuracies. HighTec EDV-Systeme GmbH neither gives any guarantee nor accepts any liability whatsoever for consequential damages resulting from the use of this document or its associated product. HighTec EDV-Systeme GmbH reserves the right to alter the information contained herein without prior notification and accepts no responsibility for any damages that might result.

HighTec EDV-Systeme hereby disclaims any and all warranties and liabilities of any kind, including without limitation, warranties of non-infringement of intellectual property rights of any third party.

Rights - including those of translation, reprint, broadcast, photomechanical or similar reproduction and storage or processing in computer systems, in whole or in part - are reserved. No reproduction may occur without the express written consent from HighTec EDV-Systeme GmbH.

Copyright © 2026 HighTec EDV-Systeme GmbH, D-66113 Saarbrucken.