how to flash program by RS232 in XPC564AKIT324S Evaluation Board

cancel
Showing results for 
Search instead for 
Did you mean: 

how to flash program by RS232 in XPC564AKIT324S Evaluation Board

302 Views
Contributor III

how to flash program by RS232 in XPC564AKIT324S  Evaluation Board because P&E USB multilink Programmer, whenever i try to flash elf into evt board, FEEDFACECAFEBEEF password is popup after that i cant be programmed. i think the password is erased in the processor. suggest me if any way to flash the password again or how to flash the evt board through RS232 (eSCI)..David Tosenovjan @Lukas Zadrapa

5 Replies

28 Views
NXP TechSupport
NXP TechSupport

Hi, have you been manipulating shadow flash content before the issue happens?

28 Views
Contributor I

yes, I had been manipulated the shadow content, also experiencing the same issue.davidtosenovjan

0 Kudos

28 Views
NXP TechSupport
NXP TechSupport

According to your description I am afraid your device is censored.

 

Censorship is very sensitive thing. It is needed to use it very carefully, because an inappropriate usage can lead in making the device useless. If you accidentally erase shadow flash there is no chance to recover it (unless it had been though about before).

If your device is censored and you don’t have any pre-prepared recovery code located in the internal flash memory, there is no way how to unlock it and everything you can do is to order new sample, and re-solder it instead of the censored one.

In case you switch to serial boot mode, you can access to the device over JTAG, but internal flash does not work (it means internal RAM target works, internal FLASH target does not).

 

I have also made example code for censorship:

https://community.nxp.com/docs/DOC-332583

 

Also I could recommend to study following appnote:

http://cache.freescale.com/files/32bit/doc/app_note/AN3787.pdf

28 Views
Contributor I

Hi David Tosenovjan,

 

thanks for your continuous support.

 

Best regards,

Joel M

0 Kudos

28 Views
Contributor III

Thanks for your reply @David Tosenovjan

Yes i manipulate. the program i dumped into the board is as below

void Flash_Program(void)
{
    unsigned int i;        

    //unlock shadow block
    FLASH_A.LMLR.R = 0xA1A11111;    //unlock register
    FLASH_A.LMLR.R = 0x000303FF;    //unlock shadow flash
    
    FLASH_A.SLMLR.R = 0xC3C33333;    //unlock register
    FLASH_A.SLMLR.R = 0x000303FF;    //unlock shadow flash
    
    //erase shadow flash
    FLASH_A.MCR.B.ERS = 1;
    *(unsigned int*)0x00FFC000 = 0xFFFFFFFF;    //interlock write - write any address in shadow block
    FLASH_A.MCR.B.EHV = 1;
    while(FLASH_A.MCR.B.DONE == 0){};
    FLASH_A.MCR.B.EHV = 0;
    FLASH_A.MCR.B.ERS = 0;    
    
    //confirm the shadow flash is erased
    for(i=0x00FFC000;i<0x00FFFFFF; i=i+4)
    {
        if(*(unsigned int*)i != 0xFFFFFFFF)
            while(1){};    //shadow flash not erased!
    }                
    
    //program shadow flash (restore default password and censoring information)
    FLASH_A.MCR.B.PGM = 1;    
    //program first 128bit page
    *(unsigned int*)0x00004000 = 10;    // write data within 128bit programming page
//    *(unsigned int*)0x00FFC002 = 12;    // write data within 128bit programming page
    FLASH_A.MCR.B.EHV = 1;                    // program page (words that were not written above will have default value 0xFFFF)
    while(FLASH_A.MCR.B.DONE == 0){};
    FLASH_A.MCR.B.EHV = 0;
    //program second 128bit page
    //*(unsigned int*)0xFFFDE0 = 0x55AA55AA;    // this uncensores the device
//    *(unsigned int*)0xFFFDE0 = 0xBABABABA;    // this censores the device    
//    FLASH_A.MCR.B.EHV = 1;                    // program page (words that were not written above will have default value 0xFFFF)
//    while(FLASH_A.MCR.B.DONE == 0){};
//    FLASH_A.MCR.B.EHV = 0;
    //end of program sequence
    FLASH_A.MCR.B.PGM = 0;
}

Help me to solve this or solution..

0 Kudos