This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Continue the Target using Serial Wire Debug Protocol

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.

Parents Reply Children
  • 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,

    Harshan