Skip to main content
dave8
Associate
Jul 18, 2008 6:25 AM UTC
Question

jtag communication failure

Posted on July 18, 2008 at 08:25

jtag communication failure

    This topic has been closed for replies.

    12 replies

    16-32micros
    Associate III
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    Hi dave2,

    Do you have screenshot of the failure. May be this could be explained by :

    1) Re-configuring JTAG pins (port A) to Standard GPIO or disabling them.

    2) Entering low power modes ( Sleep, STOP or Standby) the connection will be lost automatically if debug features in low power mode are not enabled ( you can have a look of reference manual RM0008 : debug section)

    Cheers ;)

    STOne-32

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    I'm using an STM32F103VBT6 in a new design in progress. I'm using Keil tools and ULINK2 emulator. Everything has been progressing, but all of a sudden I'm getting JTAG communcation failures, though it's been working fine for a while. this has happened on two different boards (our target hardware). What can cause the processor to stop jtag communication, and how can I recover? Thanks.

    16-32micros
    Associate III
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    Dear dave2,

    If you are using keil StarterKit, you can change the bootmode using Boot1 and boot0 jumpers to either RAM or System memory and then reset your STM32 micro and load again you Ulink connection with keil. It should work :)

    Hope this trick is useful for you :) Cheers, STOne-32

    [ This message was edited by: STOne-32 on 14-01-2008 18:33 ]

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    thanks for the quick response. At this point, I can't really do much to find the actual cause of the problem, since I have no way to re-program the processor. I normally use the ULINK2 to program the flash, but now that the jtag connection is dead, I can't re-program or even erase the flash. Seems like a catch-22 situation.

    So, the question is whether there is some way to re-program the processor in my target hardware when jtag is dead? Or some other way to get around this issue? Thanks.

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    thanks for the quick response. At this point, I can't really do much to find the actual cause of the problem, since I have no way to re-program the processor. I normally use the ULINK2 to program the flash, but now that the jtag connection is dead, I can't re-program or even erase the flash. Seems like a catch-22 situation.

    So, the question is whether there is some way to re-program the processor in my target hardware when jtag is dead? Or some other way to get around this issue? Thanks.

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    UPDATE: I tried the fix on my second board, and it fixed the problem! My first board must have a different issue, which I will look into separately. Thanks for the help and the fix.

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    Thanks. That makes sense as a fix, but doesnt seem to help. I am working on my own target hardware, so I added a jumper on boot0, and tied it high so it should not be booting from flash. Unfortunately the ULINK2 is still claiming no JTAG Devices Found.

    dave8
    dave8Author
    Associate
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    Thanks. That makes sense as a fix, but doesnt seem to help. I am working on my own target hardware, so I added a jumper on boot0, and tied it high so it should not be booting from flash. Unfortunately the ULINK2 is still claiming no JTAG Devices Found.

    john
    Associate III
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    And are there any defines for the DGB registers in the ST libraries ?

    I'm having to write :-

    #if DELAY_BY_RTC

    #ifdef DEBUG

    {

    vu32 *DBGMCU_CR = (u32*)0xE0042004;

    #define DBG_STOP 0x02

    #define DBG_SLEEP 0x01

    *DBGMCU_CR = DBG_STOP;

    }

    #endif

    #endif

    Thanks,

    John.

    john
    Associate III
    May 17, 2011 10:21 AM UTC
    Posted on May 17, 2011 at 12:21

    re: enabling JTAG in STOP mode.

    Is there also a way to stop the RTC clock at a break point ?

    I'm using the RTC to generate an event to wake from WFE,

    but if I use a break point, then the RTC runs on ahead of the

    time to wake up...

    Thanks,

    John.