BackGround Debug Commands

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BackGround Debug Commands

1,467 Views
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..
Labels (1)
0 Kudos
3 Replies

494 Views
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 Kudos

494 Views
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 Kudos

494 Views
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 Kudos