We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Greetings, sir, i am working on serial wire debug protocol and till now i succeeded in halt,write,erase,and reset the target. now i am trying to implement breakpoints and watch points on my custom debugger. for break point i read "the definitive guide to cortex m3 by joseph yiu" book as per that i put the address on fpb comparator register, and when ever target program counter hit the address automatically the target was break and halt, till now every thing was fine, but now i want to continue the target from where it was halted. if i reset the target then the pc is resetting and target is runs from starting. hear i need to continue the target how could i achieve so that i can continue further, i hope you understand clearly.
Thanks and regards Harshan.
Greetings and Thanks for quick reply
after single step C_STEP i am unable to clear C_HALT bit which gives unpredictable behavior. i done following steps
halted the core
set the break point 1
set the break point 2
reset the target( target under run)
after hitting the first break point core halted
single step with C_STEP in DHCSR Register
trying to Continue by clearing C_HALT in DHCSR which i got unpredictable behavior.
suggest if i am missing any thing.
Thanks and Regards
Harshan
Could you check to make sure you didn’t clear C_DEBUGEN (bit 0) accidentally? Thanks
Thanks for Reply,
i send as to target
DHCSR = 0xA05F0001, is this right??
thanks and write.
Yes, when you do single step, you should write
DHSCR = 0xA05F0001UL | 0x4 ; // C_STEP
Then wait until S_RETIRE_ST is 1.
And then set
DHSCR = 0xA05F0001UL; // unhalt
Hope this helps.
Joseph
sorry for response after a long time,
as per above steps i performed
when core halt after break point hit
i tried single step the target as below
DHCSR = 0xA05F0101
while(!(target_read(DHCSR) & S_RETIRE_ST));
but the target is always present inside while loop
i tested the above logic before i put the break point and i successfully executed the breakpoint
but after breakpoint hitting if i trying to step, it will not come out from while loop.
Should i have to perform any thing before i single step???
Thanks and Regards,