UNABLE TO FLASH MPC5602P

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

UNABLE TO FLASH MPC5602P

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

标签 (1)
标记 (2)
1 解答
618 次查看
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.

在原帖中查看解决方案

3 回复数
618 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

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

0 项奖励
618 次查看
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 项奖励
619 次查看
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.