Hi
I already can launch group with core0 and core2 according to the following picture, the left side is run on core0, and right side run on core2.
But core2 can't run after I power off and power on the device. Only can run in debug mode.
Is there anyone has experience or idea about this?
The attachment is my main.c file, I also add the following code into the main function.
Solved! Go to Solution.
Hi @BillWen
I don't see anything particularly wrong or different with the files (other than CM7_2_ENABLE not included, but that should not matter for release, it is only for debugging), so it must be configuration or source code in the main application.
I've tested the attached project in our S32K3X8 EVB, and after power cycling, the secondary core boots and blinks the blue LED. Please test it on your side. It is configured for RTD 3.0.0.
Best regards,
Julián
Hi @Julián_AragónM:
Thanks for your reply, and sorry for late reply due to other task.
Actually, I created a new dual core project in the beginning, so I think the project setting is correct.
I attach my linker and startup file, you can check it if possibly. I think this one would be a long-term issue, you have more time to help me to fix this, thanks a lot.
Thanks
BR, BillWen
Hi @BillWen
Are you able to share the project instead? I do not see anything necessarily wrong with the linker/startup files.
Best regards,
Julián
Hi @Julián_AragónM:
Thanks for your reply.
The attachment are project_setting file, because project files are too big that can't uploaded.
Please help to check these files. If you need other files please me know.
Thanks
BR, BillWen
Hi @BillWen
I don't see anything particularly wrong or different with the files (other than CM7_2_ENABLE not included, but that should not matter for release, it is only for debugging), so it must be configuration or source code in the main application.
I've tested the attached project in our S32K3X8 EVB, and after power cycling, the secondary core boots and blinks the blue LED. Please test it on your side. It is configured for RTD 3.0.0.
Best regards,
Julián
Hi @BillWen,
You can try to use something like WinMerge to compare the files for configuration, but if your project is too big or different in implementation, there is no reason, it is a different project completely.
My recommendation is to copy over the configuration in the working project (either the one I've shared, or the existing one in the community post), since there is clearly a wrongly configured option.
Best regards,
Julián
Hi @BillWen,
I think it would be better to close this one for now. If you open a new thread, you can simply reference this one to know it is a continuation.
Thank you.
Hi @Julián_AragónM:
Thanks for your reply.
I use Sys_GetCoreID() function to get coreID at second main.c, and if core ID is 2 then print some log. It can print log normally in debug mode.
Our project's purpose is core0 run BMS whole system and core2 run some ADC signals feedback. Due to I want to try core2 so I just print log by uart for test now.
I know the project you mentioned, and I also put the related code into the project but I still can't run core2 after power off/on. Do I need upload some files then you can check it clearly?
The following is my core2, just print log by uart.
int main(void)
{
uint8 core = Sys_GetCoreID();
if(core == 2)
{
/* Initialize the Mcu driver */
Platform_Init(NULL_PTR);
//Port_Init(NULL_PTR);
Uart_Init(NULL_PTR);
while (1)
{
Printf("core2 is alive!\r\n");
Uart_Printf("core2 test!\r\n");
}
}
}
Thanks
BR, BillWen
Hi @BillWen,
I understand you've implemented the existing example into your project, but if it still does not work without the debugger, it could be because the debugger's script enables peripherals, clocks and initializes all the volatile memories, etc. Without the debugger, the application cores must do that.
I think it is easier to first import the example and see if it works in your board; After that, you can compare it to your project's configuration.
Also, have you included the defined symbols for multicore functionality?
Best regards,
Julián
Hi @BillWen,
The picture you've shared cannot be seen clearly, but I see you are not using S32DS. Have you tried the example project shared in the community? S32K358 Multicore Start CM7_2 from CM7_0 - NXP Community.
It configures CM7_2 both through the MC_ME register and with the Power component. Below is the function for starting the second core (which I can see it is the same as the one you've shared) start_core_cm7_2:
void start_core_cm7_2(void){
IP_MC_ME->PRTN0_CORE4_ADDR = (uint32)0x00800000;
IP_MC_ME->PRTN0_CORE4_PCONF = 0x00000001;
IP_MC_ME->PRTN0_CORE4_PUPD = 0x00000001;
IP_MC_ME->CTL_KEY = 0x5AF0U;
IP_MC_ME->CTL_KEY = 0xA50FU;
while (IP_MC_ME->PRTN0_CORE4_PUPD == 1) { };
while ((IP_MC_ME->PRTN0_CORE4_STAT & MC_ME_PRTN0_CORE4_STAT_CCS_MASK) == 0) { };
}
USE_RTD_POWER_IP:
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);
You can look over at the power configuration for the second core through the configuration tool's view:
Best regards,
Julián
Hi @BillWen
What exactly are you running in the second core? How are you testing if it is working?
You can try the project I've shared in the previous reply, which starts core 2 after 4 blinks from core 0. It works after power-cycling the board.
Best regards,
Julián