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