"Cannot set debug register" error message

Follow

Comments

5 comments

  • Avatar
    James Griffith

    Jon,

       I have this problem right now, and I've set the divider to 255. I have good confidence that the target is correct because this project downlaods and debugs on a duplicate board. I'm using an STM32F100R6. The process appears to run fine with the last successfully programmed image. 

     Is there another way that the "Cannot set debug register" message might appear? 

    Cheers,

    James

    Cannot set debug register

  • Avatar
    h

    I'm having the same issue with a STM32F103.

    Sometimes it runs, but sometimes when I get the "Cannot set debug register" I'm not able to debug anymore at all.

    Currently I even get the error without the board connected, so this is most likely not only a hardware issue.

  • Avatar
    frank meyer

    This might also be a power supply issue.

    I have a stm32f4 board with TFT-LCD attached, which gives the same error message when supplied via JTAG adapter (CrossConnect).

    I can connect to the target without problems when supplying the board externally.

     

    And I had the same trouble with another stm32f4-discovery board (unstable debug connection), when supplied via USB. (This board has the debug adaptor on-board). The problems disappeared again when supplying it externally.

  • Avatar
    Lance Kasari

    I found that having the "Target Interface Type" set incorrectly can also cause this problem.  I had to go to the properties for my target and change the Target Interface Type from JTAG to SWD to match my hardware.  I found that this setting went back to JTAG after upgrading to a new minor version of CrossStudio as well.

  • Avatar
    Lance Kasari

    I just found out that the Target Interface Type property moved from the Target properties to the Project properties.  So you can search Project Properties for "Target Interface Type" and set it to either JTAG or SWD depending on what you need.

Please sign in to leave a comment.