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 ?
Solved! Go to Solution.
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
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
Thank you very much DPB.
Your solution works fine.
JNo