programming manually Breakpoint with PC9S12XDP512

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

programming manually Breakpoint with PC9S12XDP512

Jump to solution
1,693 Views
JNo
Contributor I

Hello,

 

I try to program an internal breakpoint in 68hcs12xDP512 without success.

I use BDI_access tool that can set only registers.

 

My Way is the following:

Set register DBGC1 (0x0020) to 0x99 in order to select  comparator B  // select break point     
Set register DBGBCTL (0x0028) to  0x81  in order to arm and validate equal comparison  // breakpoint classification
Set register DBGBA   (0x0029) to  0x7F  // breakpoint adress H      
Set register DBGBA   (0x002A) to  0xC0  // breakpoint adress M      
Set register DBGBA   (0x002B) to  0xC0   // breakpoint adress L     

 

When the program running and reach 0x7FC0C0, the microcontroller continue execution without breaking on my breakpoint.

 

I check with orther tool, the values of registers are correcly set.

 

Somebody have an idea on this problem ?


          

Labels (1)
0 Kudos
Reply
1 Solution
635 Views
DPB
NXP Employee
NXP Employee

Hello JNo

 

It is important to first configure the breakpoint registers before setting the ARM bit.

Thus write DBGC1 first to 0x19 before writing to the other registers.

Then configure the other registers.

Then write DBGC1 to 0x99 to arm the module.

 

Also, to generate a breakpoint at an opcode address DBGBCTL should contain 0x31.

 

DPB 

View solution in original post

0 Kudos
Reply
2 Replies
636 Views
DPB
NXP Employee
NXP Employee

Hello JNo

 

It is important to first configure the breakpoint registers before setting the ARM bit.

Thus write DBGC1 first to 0x19 before writing to the other registers.

Then configure the other registers.

Then write DBGC1 to 0x99 to arm the module.

 

Also, to generate a breakpoint at an opcode address DBGBCTL should contain 0x31.

 

DPB 

0 Kudos
Reply
635 Views
JNo
Contributor I

Thank you very much DPB.

Your solution works fine.

 

JNo

0 Kudos
Reply