Hello Everyone , I'm trying to initialize the core 1 in S32k324 by Core 0.
I attached my Code here.
I made CM7_1_Enable as 0 in core 0 , according to the start_up file of core 0, clock for core 1 is should not enable in there.
In core 0 main file I'm trying to enable the core clock for core 1 , but before that I'm checking the core1 clock status bit , it is already enabled.
Even I not initialized the CM7_1_Enable in path and symbol core 1 clock is enabled.
#s32
But if try to connect with and flash the core 1 image with debugger with run on reset option, its stuck at wait for clock, then once i enabled the core 1 clock with core 0 , core 1 start running.
1. Why the core clock is enabled even CM7_1_Enable is 0?
2. I need to verify the core 1 clock is enabled by core 0, how can i do that?
void core_one_startup(void)
{
if((IP_MC_ME->PRTN0_CORE1_STAT&0x0001) != 1)
{
printf("Core one not enabled yet");
}
else
{
printf("Core one is enabled"); // Core 1 is always on?
}
IP_MC_ME->PRTN0_CORE1_PCONF |= MC_ME_PRTN0_CORE1_PCONF_CCE_MASK;
IP_MC_ME->PRTN0_CORE1_ADDR = (uint32)AVB_CODE;
IP_MC_ME->PRTN0_CORE1_PUPD |= MC_ME_PRTN0_CORE1_PUPD_CCUPD_MASK;
IP_MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY( 0x5AF0);
IP_MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY(~0x5AF0);
while (IP_MC_ME->PRTN0_CORE1_PUPD == MC_ME_PRTN0_CORE1_PUPD_CCUPD_MASK);
/*wait for core1 status*/
while((IP_MC_ME->PRTN0_CORE1_STAT&0x0001) != 1);
}
/*!
\brief The main function for the project.
\details The startup initialization sequence is the following:
* - startup asm routine
* - main()
*/
int main(void)
{
core_one_startup();
return exit_code;
}
S32K3