s32 option byte

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

s32 option byte

Jump to solution
2,643 Views
hajianik
Senior Contributor I

Hi,

The customer wants to be able to program option bytes @0x400 including the backdoor keys in the Application which is unique for each board through a CAN message DURING THE RUNTIME.

 

NOW MY 1ST QUSETION IS CAN WE PROGRAM THE OPTION BYTES STARTING AT 0X400 FROM THE APP STARTING 0X60400?

i have other questions that I rather wait to get a response.

 

Thanks,

Koorosh Hajiani

 

Tags (1)
0 Kudos
Reply
1 Solution
2,607 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @hajianik 

you didn't mention which MCU you have exactly. But address 0x60400 falls within first 512KB block anyway, so this address is in the same read partition. That means the code must be executed from RAM or from another flash block (other 512KB program flash block or from data flash). But it still can be done.

Notice that you can't program a phrase which is not fully erased. If, for example, the FSEC in Flash configuration field is in default unsecured state 0xFE, you can't program this phrase again. It is necessary to backup the data to RAM, erase whole sector (4KB) and then program it back with new values. Because first sector contains interrupt vector table, reset vector etc, there could be a problem if the device is reset or powered off during the update...

Regards,

Lukas

View solution in original post

0 Kudos
Reply
4 Replies
2,608 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @hajianik 

you didn't mention which MCU you have exactly. But address 0x60400 falls within first 512KB block anyway, so this address is in the same read partition. That means the code must be executed from RAM or from another flash block (other 512KB program flash block or from data flash). But it still can be done.

Notice that you can't program a phrase which is not fully erased. If, for example, the FSEC in Flash configuration field is in default unsecured state 0xFE, you can't program this phrase again. It is necessary to backup the data to RAM, erase whole sector (4KB) and then program it back with new values. Because first sector contains interrupt vector table, reset vector etc, there could be a problem if the device is reset or powered off during the update...

Regards,

Lukas

0 Kudos
Reply
2,581 Views
hajianik
Senior Contributor I

Hello,

Thank you for your response.

can I erase the section starting at 0x400( option byte) ?

Or the starting address of a 4kb block need to be aligned with 4kb block?

such as 0x0000,0x1000, 0x 2000 and so on.

My devise is s32k148 with 1.5 MB flash .

 

Regards,

Koorosh Hajiani

Tags (1)
0 Kudos
Reply
2,566 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

The sectors always start at aligned address (0x0, 0x1000, 0x2000...). You need to erase whole sector 0x0-0x1000.

Regards,

Lukas

2,549 Views
hajianik
Senior Contributor I
Thank you,
Regards,
Koorosh Hajiani
0 Kudos
Reply