Hey there,
I am investigating how to enable and use the dual-core functionality on the S32K324. There are two questions I can't get my head around:
thanks in advance
解決済! 解決策の投稿を見る。
Hi @FelixR
If you have S32K324, it’s already in decoupled mode. This device is considered as dual core.
If you have S32K344 then it is in lock step mode by default and it can be configured to work in decoupled mode, so it will become S32K324 in fact. The configuration can be changed by programming of corresponding DCF record in UTEST flash. But as I said, this is not necessary in case of S32K324.
When you create new project for S32K324 in S32 Design Studio, two projects are created. One for each core. Each project has own linker file, own startup files etc.
It is possible to define which cores will start automatically after reset in Boot Configuration Word in IVT (see “32.5.1 Boot configuration word” in the S32K3 reference manual). Addresses of entry point are defined in IVT. Each core has specific address. A core which is not started in this way can be started by software like this:
MC_ME->PRTN0_CORE1_ADDR = (uint32_t)(vtor); //vtor is an address of vector table
MC_ME->PRTN0_CORE1_PCONF = MC_ME_PRTN0_CORE1_PCONF_CCE_MASK;
MC_ME->PRTN0_CORE1_PUPD = MC_ME_PRTN0_CORE1_PUPD_CCUPD_MASK;
MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY( 0x5AF0);
MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY(~0x5AF0);
Regards,
Lukas
Hello,
Which part of the software shall enable core1? I'm working on S32k322 and it seems like the only place in the RTD, where these registers are used EnableCore1 routine in startup_cm7.s . However, this part of code is excluded when both MULTIPLE_CORE && MULTIPLE_IMAGE are defined.
How to start M7_1 core then if both cores are supposed to run different applications? Is therea any RTD function which can be called from M7_0 to start second core? Perhaps there is some MCAL config needed in S32DS which should be used to run 2nd core?
Best Regards,
Slawomir
I know, but I wonder if this is the preffered solution, or is it also configurable somewhere, so later it could be overwritten by accident by some generated code.
Hi @FelixR
If you have S32K324, it’s already in decoupled mode. This device is considered as dual core.
If you have S32K344 then it is in lock step mode by default and it can be configured to work in decoupled mode, so it will become S32K324 in fact. The configuration can be changed by programming of corresponding DCF record in UTEST flash. But as I said, this is not necessary in case of S32K324.
When you create new project for S32K324 in S32 Design Studio, two projects are created. One for each core. Each project has own linker file, own startup files etc.
It is possible to define which cores will start automatically after reset in Boot Configuration Word in IVT (see “32.5.1 Boot configuration word” in the S32K3 reference manual). Addresses of entry point are defined in IVT. Each core has specific address. A core which is not started in this way can be started by software like this:
MC_ME->PRTN0_CORE1_ADDR = (uint32_t)(vtor); //vtor is an address of vector table
MC_ME->PRTN0_CORE1_PCONF = MC_ME_PRTN0_CORE1_PCONF_CCE_MASK;
MC_ME->PRTN0_CORE1_PUPD = MC_ME_PRTN0_CORE1_PUPD_CCUPD_MASK;
MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY( 0x5AF0);
MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY(~0x5AF0);
Regards,
Lukas
Hello there,
this is immensely useful.
I am implementing a bootloader and want to enable multicore-support. With this method, it is possible to start an application on Core 1, from Core 0.
However, I want the bootloader to be able to "boot" its own application.
Is it possible for Core0 to relocate its own vector table and jump to a different application?
I assume that one cannot simply write the new VTOR address to MC_ME->PRTN0_CORE0_ADDR and jump to the application at runtime?
Regards,
Matthew
Hey @lukaszadrapa
Thanks! That really helped me!