UNABLE TO FLASH MPC5602P

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

UNABLE TO FLASH MPC5602P

Jump to solution
1,074 Views
bjrajendra
Senior Contributor I

Hello all,

I'm using S32DS Powerv2.1 compiler for my device MPC5602P.

I tried to flash the 8 byte word to an address where my code struck at 

while(!(CFLASH.MCR.B.PEG == 1)) {} ; but it successfully completes flash operation which I ensured using DONE bit

Kindly help in this regard.

Thanks & regards,

Raju

Labels (1)
Tags (2)
1 Solution
907 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I see.

You are trying to over-program the area that is not fully erased (all FF is erased). If data area contains not zero data, it must be erased before that (not that erase is a block operation).

So you will have to perform erase operation before programming.

View solution in original post

3 Replies
907 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you please clarify the question? Are your data to be flashed or not?

0 Kudos
Reply
907 Views
bjrajendra
Senior Contributor I

Hi David,

Thanks for your swift response.

Actually I found the solution but not sure, why it is happening like that.

Actually I'm trying to flash at the end address of my device MPC5602P which is 0x3FFF8 with eight bytes 0xFFFFFFFFFFFFFFFF as it replaces the 0xFFFF0000FFFF0000 .

Instead of using 0xFFFFFFFFFFFFFFFF, I used 0x0 which worked for me, so as to come out of while(!(CFLASH.MCR.B.PEG == 1)) {} ;

If possible, can you try to share the reason for the same.

Thanks in advance,

Raju

0 Kudos
Reply
908 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I see.

You are trying to over-program the area that is not fully erased (all FF is erased). If data area contains not zero data, it must be erased before that (not that erase is a block operation).

So you will have to perform erase operation before programming.