mcu is secured after upgrade.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

mcu is secured after upgrade.

ソリューションへジャンプ
736件の閲覧回数
everkimage
Contributor IV

My mcu is MC9S12X.

I have a bootloader and a app.First i write bootloader to board using TBDML and run it,then i upgrade the app through CAN by bootloader using a pc software.

If i delete the VECTOR 0 xxx in prm file of app,it's ok.

But if i undelete it,after upgrade and reboot,mcu is secured.

Why does it happen?

ラベル(1)
1 解決策
623件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

there is security in the flash at global address 0x7F_FF0F which is copied into FSEC register after reset. If you erase sector which contains this byte and you do not program the byte  to unsecure status then the MCU is secured after next reset, The unsecure status of the register is 0xFE. (The info for sector is valid also for other initial values like FPROT)

(0x7FF08 - 0x7F_FF0F form a Flash phrase and must be programmed in a single command write sequence. Each byte in the 0x7F_FF08 - 0x7F_FF0B reserved field should be programmed to 0xFF.)

For more info: Table 24-3. Flash Configuration Field in the ref.manual.

In order to be sure only one link AN4258: http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4258.pdf 

The an and SW files can be found in Documentation Tab at:

S12XE MCUs|16-Bit Microcontroller | NXP 

An example for unsecured status of security after reset:

//set backdoor key and UNsecure the flash (0xFE)
const unsigned char flash_array[] @0xFF00 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE};

An example for required security and backdoor key after reset:

//set backdoor key ( value, for example: 0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA) and secure the flash (0xBD)
const unsigned char flash_array[] @0xFF00 = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBD};

Best regards,

Ladislav

元の投稿で解決策を見る

1 返信
624件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

there is security in the flash at global address 0x7F_FF0F which is copied into FSEC register after reset. If you erase sector which contains this byte and you do not program the byte  to unsecure status then the MCU is secured after next reset, The unsecure status of the register is 0xFE. (The info for sector is valid also for other initial values like FPROT)

(0x7FF08 - 0x7F_FF0F form a Flash phrase and must be programmed in a single command write sequence. Each byte in the 0x7F_FF08 - 0x7F_FF0B reserved field should be programmed to 0xFF.)

For more info: Table 24-3. Flash Configuration Field in the ref.manual.

In order to be sure only one link AN4258: http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4258.pdf 

The an and SW files can be found in Documentation Tab at:

S12XE MCUs|16-Bit Microcontroller | NXP 

An example for unsecured status of security after reset:

//set backdoor key and UNsecure the flash (0xFE)
const unsigned char flash_array[] @0xFF00 = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE};

An example for required security and backdoor key after reset:

//set backdoor key ( value, for example: 0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA) and secure the flash (0xBD)
const unsigned char flash_array[] @0xFF00 = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBD};

Best regards,

Ladislav