AnsweredAssumed Answered

MPC5602P flash erase interlock write - bus errors

Question asked by Matthew Manthey on Nov 8, 2012
Latest reply on Dec 1, 2012 by Matthew Manthey

Hi,

 

I am having issues on my MPC5602P erasing the FLASH. Per the reference manual, I execute the following sequence:

 

MCR = 0x00000004; /* Set ERS in MCR: Select Operation */

LMS = 0x00000006; /* Set LSL2-1 in LMS: Select Sectors to erase */

(0x000000) = 0xFFFFFFFF; /* Latch a Flash Address with any data */

MCR = 0x00000005; /* Set EHV in MCR: Operation Start */

do /* Loop to wait for DONE=1 */

{ tmp = MCR; /* Read MCR */

} while ( !(tmp & 0x00000400) );

status = MCR & 0x00000200; /* Check PEG flag */

MCR = 0x00000004; /* Reset EHV in MCR: Operation End */

MCR = 0x00000000; /* Reset ERS in MCR: Deselect Operation */

 

 

When performing the erase interlock write, I get a bus error. Any insight on why that would be? I have verified through the code flash registers that the block is both unlocked and selected for erase. When I write to 0x0000000, I get a bus error.  The freescale driver seems to have the same issue, for me at least.

 

Any help would be greatly appreciated.

 

Thanks.

 

MM

Outcomes