s32 option byte

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32 option byte

跳至解决方案
2,735 次查看
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

 

标记 (1)
0 项奖励
回复
1 解答
2,699 次查看
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 项奖励
回复
4 回复数
2,700 次查看
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 项奖励
回复
2,673 次查看
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

标记 (1)
0 项奖励
回复
2,658 次查看
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,641 次查看
hajianik
Senior Contributor I
Thank you,
Regards,
Koorosh Hajiani
0 项奖励
回复