Locked flash memory after unhandled IVOR1 exception

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

Locked flash memory after unhandled IVOR1 exception

1,807 Views
monahussein
Contributor I

I was trying to make a 2 bit ECC error on MPC7544P, the 1st time I executed the code IVOR1 exception was detected but I wasn't implementing the handler after that whenever I re-execute the code I find that I am not able to unlock flash blocks. Any explanation?

Labels (1)
3 Replies

1,230 Views
jasoncao
Contributor II

Hi,

     Do you mean that you try to  dowload s19/elf failed through the trace32 ? I think that you just need to clear the Register:

C55FMC_MCR  BIT:EHV,PGM by use trace32. If it isn't work,You could try to clear the FCCU NCF Register and Memu Error Flag Register.

1,230 Views
monahussein
Contributor I

Hi Jason,

Thanks for your reply. I can connect using JTAG but when I debug the code below nothing happens and the flash blocks remain locked

    C55FMC.LOCK0.R = 0; // remain 0x3FF0FFFC

    C55FMC.LOCK1.R = 0; // remain 0x0000FFC0

    C55FMC.LOCK2.R = 0; // remain 0xFFFFFF00

    C55FMC.LOCK3.R = 0; // remain 0x0000FFFF

/*Hence the following code is not executed */

    C55FMC.MCR.B.ERS = 1;

    C55FMC.SEL2.R = 0x00000080; // select the large block 7

    *(uint32*)0x011C0000 = 0xFFFFFFFF;    //interlock write

    C55FMC.MCR.B.EHV = 1;

    while(C55FMC.MCR.B.DONE == 0);

    C55FMC.MCR.B.EHV = 0;

    C55FMC.MCR.B.ERS = 0;

    C55FMC.MCR.B.PGM = 1;

    *(uint32*)0x011C0000 = 0x12345678;    //interlock write

    *(uint32*)0x011C0004 = 0xAFDBCA42;

    C55FMC.MCR.B.EHV = 1;

    while(C55FMC.MCR.B.DONE == 0);

    C55FMC.MCR.B.EHV = 0;

    C55FMC.MCR.B.PGM = 0;

    C55FMC.MCR.B.PGM = 1;

    *(uint32*)0x011C0000 = 0xABCDEF12;    //interlock write

    *(uint32*)0x011C0004 = 0xECDFBAD3;

    C55FMC.MCR.B.EHV = 1;

    while(C55FMC.MCR.B.DONE == 0);

    C55FMC.MCR.B.EHV = 0;

    C55FMC.MCR.B.PGM = 0;

    test_read = *(uint64*)0x011C0000;

0 Kudos
Reply

1,230 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I would agree it is needed to handle FCCU and MEMU faults.

Pay attention to following example code:

Example MPC5744P_1b+2b_FLASH_ECC_error_injection GHS614

0 Kudos
Reply