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
已解决! 转到解答。
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.
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
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.