shared-memory code of multcores only works in debug mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

shared-memory code of multcores only works in debug mode

跳至解决方案
982 次查看
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

标记 (2)
0 项奖励
1 解答
819 次查看
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

在原帖中查看解决方案

0 项奖励
3 回复数
820 次查看
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

0 项奖励
819 次查看
bwp530
Contributor IV

Hi lukas:

thank you very much. It really help me.

0 项奖励
819 次查看
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 项奖励