Power off then power on core2 would not work in dual-core mode based on S32K358

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Power off then power on core2 would not work in dual-core mode based on S32K358

Jump to solution
1,137 Views
BillWen
Contributor II

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.

BillWen_0-1745829974612.png

 

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.

void start_core_cm7_2(void){
 
IP_MC_ME->PRTN0_CORE4_ADDR = (uint32)0x00800000;
IP_MC_ME->PRTN0_CORE4_PCONF = MC_ME_PRTN0_CORE4_PCONF_CCE_MASK;
IP_MC_ME->PRTN0_CORE4_PUPD = MC_ME_PRTN0_CORE4_PUPD_CCUPD_MASK;
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) { };
}
 
Thanks
BR, BillWen
0 Kudos
Reply
1 Solution
779 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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 

View solution in original post

0 Kudos
Reply
13 Replies
929 Views
BillWen
Contributor II

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.

BillWen_0-1746663925710.png

BillWen_1-1746663958795.png

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

 

0 Kudos
Reply
915 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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 

0 Kudos
Reply
815 Views
BillWen
Contributor II

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

0 Kudos
Reply
780 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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 

0 Kudos
Reply
612 Views
BillWen
Contributor II
Hi @Julián_AragónM:

Thanks for your help.
I know the example can show what I need but I still can't find out that what's the problem about my project.
Project setting, Linker files, startup files are almost the same with the example project.
If you have any other idea just please that me know, this is really important for my project, thanks.

Thanks
BR, BillWen
0 Kudos
Reply
603 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
589 Views
BillWen
Contributor II
Hi @Julián_AragónM:

I will spend some time to check all the configuration between my project and the example which provided by you.
One thing I need to mention is that my project was created based on dual-core new project. That's why I think the configuration should not be wrong.
(I create a new clean dual-core project by S32DS, and move the bring-up project which provided by NXP into dual-core project.)

Btw, should I close this one and create another post or I can keep this until I fix the issue?

Thanks
BR, BillWen
0 Kudos
Reply
550 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply
1,056 Views
BillWen
Contributor II

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

0 Kudos
Reply
1,041 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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? 

Julin_AragnM_0-1746205592486.pngJulin_AragnM_1-1746205598548.png

Best regards,
Julián

0 Kudos
Reply
1,111 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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:

Julin_AragnM_0-1745957851815.pngJulin_AragnM_1-1745957864900.png

Best regards,
Julián

0 Kudos
Reply
1,096 Views
BillWen
Contributor II
Hi @Julián_AragónM:
Yes, I use S32DS to debug,
According to your reply, you mean there are two way to start core2 right?
It seems USE_RTD_POWER_IP flag and start_core_cm7_2 are different ways.
Currently, I try to follow the example "S32K3-BESS-Firmware-Version-0.8.0-Demo" project, I can't see any different with my project. Maybe I miss some setting.
Anyway my problem is I can't start up core2 after I power off then power on, but can do it by using S32DS debug mode. I will try "S32K358_Multicore_Start_CM7_2_400" later, if you have any suggestion, please that me know, thanks a lot.

Thanks
BR, BillWen
0 Kudos
Reply
1,074 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply