BackGround Debug Commands

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

BackGround Debug Commands

1,807 次查看
Alice
Contributor I
Hi,
I am using HCS08 Microcontroller with Code Warrior IDE and P&E USB Multilink.
I want to set block protection for my controller using FPROT Register. The datasheet
says that this can be done only using BackGround Debug Commands. I am Unable to figure out how to send these commands. I could not see any option in the IDE through which these cammands can be sent.
Also, How to write the application for backdoor Key access to unsecure the microcontroller.
Thanks and Regards,
Alice..
标签 (1)
0 项奖励
回复
3 回复数

834 次查看
P_EMark
Contributor III
Alice:

When you use the debugger to modify memory, this is effectively a "Background Debug Command" (the debugger would use the BDM Command "write_byte" to modify the memory appropriately).

Therefore, from the debugger, you should be able to modify these registers simply by attempting to write from them from the memory window (not from code executing on the part itself).

Regards,
Mark
P&E
0 项奖励
回复

834 次查看
prashanterande
Contributor I

Hi mark,

My self prashant.

I m using gt16a, I have same problem. The fprot register only write in debug mode.

How we can enter in debug mode and how to write?

plz help me!!!!

0 项奖励
回复

834 次查看
bigmac
Specialist III

Hello,

 

Not sure whether you require to initialize the block protection from within your code, or need to alter the block protection value within a debug session.  I will assume that you actually require to initialize block protection.

 

The value within the NVPROT flash register is automatically written to the FPROT register during a reset.  This means that you need to program the NVPROT setting, at the same time as your project code.  The assembly code to accomplish this:

 

  ORG   NVPROT

  DC.B  <value>

.

For C, the following should work with the CW compiler -

 

const byte NVPROT_init @0xFFBD = <value>;

.

Regards,

Mac

0 项奖励
回复