How to protect Bootloader and Vector Table?

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

How to protect Bootloader and Vector Table?

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

I want my bootloader and vector tables stored at the begining of flash protected in such a way that they can only be overwritten by a JTAG device.

 

I thought the FTFL_FSEC register would handle this, but it appears this register ALSO has the ability to even lock out a JTAG device from writting to the flash. 

 

So, how do I accomplish my goal?

0 件の賞賛
1 解決策
504件の閲覧回数
ignisuti
Contributor IV

I figured out what I was doing wrong.

 

FSEC occurs after FOPT. However, I was focusing on this information from the Reference Manual which shows FSEC occurring before FOPT.

 

Address: FTFL_FSEC is 4002_0000h base + 2h offset = 4002_0002hAddress: FTFL_FOPT is 4002_0000h base + 3h offset = 4002_0003h

 

The actual address (for the purposes of loading this configuration data into FLASH) are...

FSEC = 0x0_040C  

FOPT = 0x0_040D

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
505件の閲覧回数
ignisuti
Contributor IV

I figured out what I was doing wrong.

 

FSEC occurs after FOPT. However, I was focusing on this information from the Reference Manual which shows FSEC occurring before FOPT.

 

Address: FTFL_FSEC is 4002_0000h base + 2h offset = 4002_0002hAddress: FTFL_FOPT is 4002_0000h base + 3h offset = 4002_0003h

 

The actual address (for the purposes of loading this configuration data into FLASH) are...

FSEC = 0x0_040C  

FOPT = 0x0_040D

0 件の賞賛
504件の閲覧回数
evgenik
Contributor IV

Hi Joe.

Are you using K60 or K61 MCU? In K61 you can do 'Secure enable' (can connect with JTag) and 'Mass erase disble' (can't connect more with JTag, but can remove flash lock with key that you prepare on secure MCU). The address for secure the flash are the same in K60 and K61, but K60 haven't 'Mass erase disble' option.

What option you use for write these

FSEC = 0x0_040C

FOPT = 0x0_040D

registers (from code, by JTag, by macro)?

Thanks.

Evgeni.

0 件の賞賛