cmicrocontrollermulticoreinfineon

How to activate core 1 and 2 on AURIX TriCore microcontrollers?


I'm new to programming TriCore MCUs. I am trying to get a program running on all the three cores of the MCU. I am using the TC277 TriBoard and the HighTec Free Entry toolchain with the Universal Debug Engine. Here is the code I am using:

int main()
{
    switch (__mfcr(CPU_CORE_ID))
    {
        case 0:
        {
            main_Core0();
            break;
        }

        case 1:
        {
            main_Core1();
            break;
        }

        case 2:
        {
            main_Core2();
            break;
        }
    }

    return (0);
}

When I start debugging i see that only Core0 is running while Core 1 and 2 remain "inactive". Can someone explain me why aren't they running and how to fix this? Thanks.


Solution

  • It is normal behaviour of AURIX that after system start only core 0 is running. Normally, your compiler's startup code is responsible for activating the other cores. Check your compiler documentation on how to do that. I don't use the Hitech toolchain myself, so I can't help you with that.

    If you have to activate the cores by yourself, you have to write the value 2 to HALT field of the core's Debug Status Register DBGSR:

    CPUx_DBGSR.B.HALT=2;