help... again with flash security

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

help... again with flash security

3,844件の閲覧回数
jah
Contributor I
reference mc9s08rd32dwe processor
codewarrioir ide v5.7 & debugger v6.1

in the project S19 file i am asserting m(FFBF) = 0xFC and this should enable security. i start a a debug scession with this build and load it into the target. I notice the targets memory is displayed all zero's and this is an indication security is set. note m(FFB0 - FFBE) are set to 0xFF.

with the code loaded i remove the target from the debugger, do a reset on the target and begin normal target operation. I notice the targets firmware can write to its flash even tho the target is set secure. is this normal????

-i thought i have to use the back door key to do internal writes on a secure part
-the backdoor is one method. is another method to have a blank page of flash, do a blank_ck command (0x05) on the blank page of flash and the security will temporarly be removed?
ラベル(1)
0 件の賞賛
返信
7 返答(返信)

1,712件の閲覧回数
LuisF
Contributor I

That´s it thank you very much!

0 件の賞賛
返信

1,712件の閲覧回数
LuisF
Contributor I

Hi

A basic question, how does one set the value of this bits in the compiler, wich directive should I use to set those values in the flash?



thanks

0 件の賞賛
返信

1,712件の閲覧回数
LuisF
Contributor I

Hi, can somebody please help me,

 

My question is about, if one can secure the device from the IDE, so, when the device is programed, the memory will be already secured (because security bits was properly wrote all together with the uC code), or if it has to be accomplished through dedicated code in the uC (code that has to be loaded in RAM in order to write the corresponding bits in flash to secure the device memory)

 

Any help appreciated

Thanks 

0 件の賞賛
返信

1,712件の閲覧回数
bigmac
Specialist III

Hello,

 

The unprogrammed state, for the flash register that contains the security bits, actually represents a secured state.  If this location remains unprogrammed by the application code, the MCU will automatically remain secure after programming.

 

To permanently disable security would require that the flash register be explicitly programmed, at the same time as the remainder of the application code.

 

Regards,

Mac

 

0 件の賞賛
返信

1,712件の閲覧回数
jah
Contributor I
I AM REALLY TRYING TO SECURE THE PART

SECURE:
PREVENT EXTERNAL READ OF FLASH CONTENSE.

-does setting 0xFFBF=0xFC SECURE the part... ONLY... and internal software can still write to its own flash.


thanks!
0 件の賞賛
返信

1,712件の閲覧回数
peg
Senior Contributor IV
Hi jah,
 
Yes that is correct!
 
Regards
Peg
 
0 件の賞賛
返信

1,712件の閲覧回数
Alban
Senior Contributor II
Dear Jah,
 
You are mixing SECURE and PROTECTED :smileywink:
 
SECURE means no external read access = no BDM. The CPU has FULL access to all the memory read/write.
 
PROTECTED means Flash cannot be erased (see Flash Block Protection) by the application or the cable = needs Mass Erase to unlock.
 
Cheers,
Alban.
0 件の賞賛
返信