Start second core form main core

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

Start second core form main core

Jump to solution
1,840 Views
sobo
Contributor III

Hello,

 

I use a S32K358 eval board, I try to start the second core with the main core.

So in the main core after init I call the function StartCore2 but the second core doesn't start.

What else I need to check ?

 

If I use CM7_2_ENABLE the 2  and don't call StartCore2 the core start correctly.

I use one software/hex file for the both core.

Sophie

here the code :

static void StartCore2(void)
{
IP_MC_ME->PRTN0_CORE4_ADDR = (uint32) &__CORE2_VTOR;
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)
{
};

Tags (1)
0 Kudos
Reply
1 Solution
1,802 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Sophie,

Can you check my test project:

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K358-Multicore-Start-CM7-2-from-CM7-0/ta-p/19238...

I used your code and Power_IP RTD driver to start CM7_2.

In both cases, the blue LED (S32K3x8EVB-Q289), starts blinking 5 seconds after power-on reset.

 

Thank you,

BR, Daniel

 

 

View solution in original post

0 Kudos
Reply
1 Reply
1,803 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Sophie,

Can you check my test project:

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K358-Multicore-Start-CM7-2-from-CM7-0/ta-p/19238...

I used your code and Power_IP RTD driver to start CM7_2.

In both cases, the blue LED (S32K3x8EVB-Q289), starts blinking 5 seconds after power-on reset.

 

Thank you,

BR, Daniel

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1921724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EStart%20second%20core%20form%20main%20core%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1921724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20use%20a%20S32K358%20eval%20board%2C%20I%20try%20to%20start%20the%20second%20core%20with%20the%20main%20core.%3C%2FP%3E%3CP%3ESo%20in%20the%20main%20core%20after%20init%20I%20call%20the%20function%26nbsp%3BStartCore2%20but%20the%20second%20core%20doesn't%20start.%3C%2FP%3E%3CP%3EWhat%20else%20I%20need%20to%20check%20%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIf%20I%20use%26nbsp%3BCM7_2_ENABLE%20the%202%26nbsp%3B%20and%20don't%20call%26nbsp%3BStartCore2%20the%26nbsp%3Bcore%20start%20correctly.%3C%2FP%3E%3CP%3EI%20use%20one%20software%2Fhex%20file%20for%20the%20both%20core.%3CBR%20%2F%3E%3CBR%20%2F%3ESophie%3C%2FP%3E%3CP%3Ehere%20the%20code%20%3A%3C%2FP%3E%3CP%3Estatic%20void%20StartCore2(void)%3CBR%20%2F%3E%7B%3CBR%20%2F%3EIP_MC_ME-%26gt%3BPRTN0_CORE4_ADDR%20%3D%20(uint32)%20%26amp%3B__CORE2_VTOR%3B%3CBR%20%2F%3EIP_MC_ME-%26gt%3BPRTN0_CORE4_PCONF%20%3D%200x00000001%3B%3CBR%20%2F%3EIP_MC_ME-%26gt%3BPRTN0_CORE4_PUPD%20%3D%200x00000001%3B%3CBR%20%2F%3EIP_MC_ME-%26gt%3BCTL_KEY%20%3D%200x5AF0U%3B%3CBR%20%2F%3EIP_MC_ME-%26gt%3BCTL_KEY%20%3D%200xA50FU%3B%3CBR%20%2F%3Ewhile%20(IP_MC_ME-%26gt%3BPRTN0_CORE4_PUPD%20%3D%3D%201)%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3Ewhile%20((IP_MC_ME-%26gt%3BPRTN0_CORE4_STAT%20%26amp%3B%20MC_ME_PRTN0_CORE4_STAT_CCS_MASK)%20%3D%3D%200)%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1923900%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Start%20second%20core%20form%20main%20core%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1923900%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Sophie%2C%3C%2FP%3E%0A%3CP%3ECan%20you%20check%20my%20test%20project%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K358-Multicore-Start-CM7-2-from-CM7-0%2Fta-p%2F1923889%22%20target%3D%22_blank%22%20shape%3D%22rect%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K358-Multicore-Start-CM7-2-from-CM7-0%2Fta-p%2F1923889%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EI%20used%20your%20code%20and%20Power_IP%20RTD%20driver%20to%20start%20CM7_2.%3C%2FP%3E%0A%3CP%3EIn%20both%20cases%2C%20the%20blue%20LED%20(S32K3x8EVB-Q289)%2C%20starts%20blinking%205%20seconds%20after%20power-on%20reset.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%2C%3C%2FP%3E%0A%3CP%3EBR%2C%20Daniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E