Flash programe in MPC5744

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

Flash programe in MPC5744

1,526 Views
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.

Tags (2)
0 Kudos
Reply
3 Replies

1,003 Views
naichingwang
Contributor I

Yes, I have unlock block2.

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

0 Kudos
Reply

1,003 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

It should be:

C55FMC.LOCK0.R &= 0xFFFBFFFF;

Then it works...

Regards,

Lukas

0 Kudos
Reply

1,003 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

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

Regards,

Lukas

0 Kudos
Reply