Flash programe in MPC5744

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

Flash programe in MPC5744

1,527 次查看
naichingwang
Contributor I

Dear all,

I want to programe in small flash memory block2 in MPC5744.

I reference manul, but it doesn't work.

The follow is my test code.

C55FMC.MCR.B.PGM = 1;
*(unsigned int *)(0x00F98000) = 0;
*(unsigned int *)(0x00F98004) = 0x1234;
C55FMC.MCR.B.EHV = 1;
while(C55FMC.MCR.B.DONE!=1);
C55FMC.MCR.B.EHV = 0;
C55FMC.MCR.B.PGM = 0;

Best Regards.

标记 (2)
0 项奖励
回复
3 回复数

1,004 次查看
naichingwang
Contributor I

Yes, I have unlock block2.

The code is "C55FMC.LOCK0.R &= 0xFFFDFFFF;"

0 项奖励
回复

1,004 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It should be:

C55FMC.LOCK0.R &= 0xFFFBFFFF;

Then it works...

Regards,

Lukas

0 项奖励
回复

1,004 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

have you unlocked the block in C55FMC_LOCK0 register? It's locked by default...

Regards,

Lukas

0 项奖励
回复