Erase all blocks

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

Erase all blocks

945 Views
David_Estevez
Contributor I

I'm trying to perform the Erase All Blocks command, but I'm facing issues.

First of all, I created a function to send the Erase All Blocks command (0x44 in FCCOB0), as stated in RM. However, the result I got was the error bit FSTAT[ACCERR] set to 1:

David_Estevez_0-1732871190168.png

David_Estevez_1-1732871235963.png

 

I assume this is the reason:

David_Estevez_2-1732871277984.png

 

Therefore, I found a function for erasing all keys in a sample program, but it is not working because the last line does not return a successful result.

David_Estevez_3-1732871360953.png

Can you help me?


Kindly regards,
David

0 Kudos
Reply
1 Reply

918 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @David_Estevez 

The CSEc is obviously enabled.

The example in SDK uses this MASTER_ECU_KEY:

uint8_t g_authIdKey[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};

The same key is used also in function eraseKeys(). This function uses mentioned commands CMD_DBG_CHAL and CMD_DBG_AUTH. If the function was not successful, the key is obviously wrong. Do you know history of the board? Do you know current MASTER_ECU_KEY? If not, there's no way to erase the keys. And if the keys are not erased, there's no way to run Erase All Blocks command. In this case, the only option is to replace the device.

Regards,

Lukas

0 Kudos
Reply