How to secure k60fx512 ?

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

How to secure k60fx512 ?

ソリューションへジャンプ
601件の閲覧回数
handychandra
Contributor III

Hi,

I am using mqx with twrk60f120m bsp modified to support k60fx512vlq12. i have read that flash configuration bytes is configured in vectors.c

i have set config4 define to 0xffffffff, but when i  run the code, the mcu is still not secured. Please help me with this.

タグ(2)
0 件の賞賛
1 解決策
442件の閲覧回数
RadekS
NXP Employee
NXP Employee

I suppose that there is problem with reprogramming of FSEC byte default state = 0xFE = unsecured.

I guess that your loader simply write code into flash without erasing. So, when we rewrite default security byte 0xFE by 0xFF, nothing happened and MCU stay unsecured (Flash bit could be programmed only in one direction 0b1 -> 0b0).

Note: Flash data must be in the erased state before being programmed. Cumulative programming of bits is not allowed.

So, you have to:

  1. erase sector from address 0x400 prior programming OR
  2. choose different value of SEC bits. For example: 0xfffffffc.

Second solution isn’t clear (cumulative programming), but in case of security byte it could be conditionally accepted.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
442件の閲覧回数
handychandra
Contributor III

Solved. It seems i need to write config 4 0xfffffffc. 0xffffffff doesn't work.

When flash is erased, the sec bit in flash reads out 0xfe. so writing 0xff doesn't work. writing 0xfc will secure the mcu.

0 件の賞賛
443件の閲覧回数
RadekS
NXP Employee
NXP Employee

I suppose that there is problem with reprogramming of FSEC byte default state = 0xFE = unsecured.

I guess that your loader simply write code into flash without erasing. So, when we rewrite default security byte 0xFE by 0xFF, nothing happened and MCU stay unsecured (Flash bit could be programmed only in one direction 0b1 -> 0b0).

Note: Flash data must be in the erased state before being programmed. Cumulative programming of bits is not allowed.

So, you have to:

  1. erase sector from address 0x400 prior programming OR
  2. choose different value of SEC bits. For example: 0xfffffffc.

Second solution isn’t clear (cumulative programming), but in case of security byte it could be conditionally accepted.

0 件の賞賛