shared-memory code of multcores only works in debug mode

cancel
Showing results for 
Search instead for 
Did you mean: 

shared-memory code of multcores only works in debug mode

Jump to solution
385 Views
bwp530
Contributor IV

MPC5777M S32DS-2017R1

I have a shared-memory code of multcores, but it only works in debug mode. When power on again, I cann't work. 

I transplant code from Example S32R274 multi-core shared memory - S32DS Power v1.2 

1.png

2.png

3.png

Tags (2)
0 Kudos
1 Solution
222 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

as I can see in your linker file and in startup code, you don't initialize shared SRAM. This is mandatory because the SRAM is in random state after power-on which leads to double bit ECC errors. If you then access such SRAM, machine check exception is triggered.

This is from startup.s:

pastedImage_1.png

You need to run this code also for shared memory.

Regards,

Lukas

View solution in original post

0 Kudos
3 Replies
223 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

as I can see in your linker file and in startup code, you don't initialize shared SRAM. This is mandatory because the SRAM is in random state after power-on which leads to double bit ECC errors. If you then access such SRAM, machine check exception is triggered.

This is from startup.s:

pastedImage_1.png

You need to run this code also for shared memory.

Regards,

Lukas

View solution in original post

0 Kudos
222 Views
bwp530
Contributor IV

Hi lukas:

thank you very much. It really help me.

0 Kudos
222 Views
bwp530
Contributor IV

4.png

int main(void)
{
int counter = 0;
SysClk_Init();
LINFlexD_1_Init();
TransmitCharacter(0x61);

Z4_busy_flag = 1;

xcptn_xmpl (); /* Configure and Enable Interrupts */

/* Loop forever */
for(;;) {
TransmitCharacter(0x61);
counter++;
}
}

when I removed "Z4_busy_flag = 1;", the code works fine in both mode. It seems like that the program can't access the Z4_busy_flag, when power on again.

davidtosenovjanMartin KovarPetr StancikStanislav Sliva

0 Kudos