[SOLVED] Connection to TMS570LC4357

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Connection to TMS570LC4357

    Hi,

    we have some difficultes to use J-Link with TMS570LC4357 microcontroller. When program flash is empty, it works fine without any problem and here is result of start GDB with command line

    Source Code

    1. "c:\Program Files (x86)\SEGGER\JLink_V510p\JLinkGDBServerCL.exe" -select USB -endian big -if JTAG -device TMS570LC4357ZWT -speed 8000


    Source Code

    1. SEGGER J-Link GDB Server V5.10p Command Line Version
    2. JLinkARM.dll V5.10p (DLL compiled Feb 26 2016 19:04:06)
    3. -----GDB Server start settings-----
    4. GDBInit file: none
    5. GDB Server Listening port: 2331
    6. SWO raw output listening port: 2332
    7. Terminal I/O port: 2333
    8. Accept remote connection: localhost only
    9. Generate logfile: off
    10. Verify download: off
    11. Init regs on start: off
    12. Silent mode: off
    13. Single run mode: off
    14. Target connection timeout: 0 ms
    15. ------J-Link related settings------
    16. J-Link Host interface: USB
    17. J-Link script: none
    18. J-Link settings file: none
    19. ------Target related settings------
    20. Target device: TMS570LC4357ZWT
    21. Target interface: JTAG
    22. Target interface speed: 8000kHz
    23. Target endian: big
    24. Connecting to J-Link...
    25. J-Link is connected.
    26. Firmware: J-Link V9 compiled Feb 2 2016 18:43:46
    27. Hardware: V9.10
    28. S/N: xxxxxxxx
    29. Feature(s): GDB
    30. Checking target voltage...
    31. Target voltage: 3.30 V
    32. Listening on TCP/IP port 2331
    33. Connecting to target...
    34. J-Link found 2 JTAG devices, Total IRLen = 10
    35. JTAG ID: 0x4BA00477 (Cortex-R4)
    36. Connected to target
    37. Waiting for GDB connection...
    Display All


    But problem is connection to chip where running SW. JLInk reset target sucessully, but not catch it and MCU boot normally into SW and GDB server fails like this

    Source Code

    1. SEGGER J-Link GDB Server V5.10p Command Line Version
    2. JLinkARM.dll V5.10p (DLL compiled Feb 26 2016 19:04:06)
    3. -----GDB Server start settings-----
    4. GDBInit file: none
    5. GDB Server Listening port: 2331
    6. SWO raw output listening port: 2332
    7. Terminal I/O port: 2333
    8. Accept remote connection: localhost only
    9. Generate logfile: off
    10. Verify download: off
    11. Init regs on start: off
    12. Silent mode: off
    13. Single run mode: off
    14. Target connection timeout: 0 ms
    15. ------J-Link related settings------
    16. J-Link Host interface: USB
    17. J-Link script: none
    18. J-Link settings file: none
    19. ------Target related settings------
    20. Target device: TMS570LC4357ZWT
    21. Target interface: JTAG
    22. Target interface speed: 8000kHz
    23. Target endian: big
    24. Connecting to J-Link...
    25. J-Link is connected.
    26. Firmware: J-Link V9 compiled Feb 2 2016 18:43:46
    27. Hardware: V9.10
    28. S/N: xxxxxxxx
    29. Feature(s): GDB
    30. Checking target voltage...
    31. Target voltage: 3.29 V
    32. Listening on TCP/IP port 2331
    33. Connecting to target...WARNING: Data and Instruction endian differ
    34. ERROR: Timeout while reading DCC data
    35. ERROR: Could not connect to target.
    36. Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    37. ERROR: Could not start CPU core. (ErrorCode: -1)
    38. Shutting down...
    39. Could not connect to target.
    40. Please check power, connection and settings.
    Display All


    Ugly and unreliable work arround is reset MCU manually by nRST signal (pin B17) and hold this signal manually till showing line "Connecting to target...".
    I am able repeat this behavior on two pieces of JLink, any version of SW with support of this MCU (minimally 5.02a, 5.02f, 5.10j, 5.10p, 5.11d) and many types of HW. One of this is TI HDK board. (schematics http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spnr043&fileType=zip ) But our different HW have same behavior.

    Any idea? For example write JLinkScript file? How? It looks like I need change reset sequence and/or type.
    I am sure, that problem is on JLink, because SignalDigital XDS200 on same JTAG connector works fine.

    PS: why JLink detect MCU core like Cortex-R4?

    The post was edited 2 times, last by jiri.dobry ().

  • Hi,

    could you provide us with a binary for reproduction purposes?
    We have a TMS570LC4357 on a TI Hercules Development Kit (HDK) available here.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    I think that I found some more informations. Problem is on the internal watch dog. Our code enable this watch dog early as is possible during boot.
    Here is code used on demontration. This user code works without problem:

    C Source Code

    1. void main(void)
    2. {
    3. for (;;)
    4. {
    5. }
    6. }


    And this code not

    C Source Code

    1. void main(void)
    2. {
    3. watchDogInit(50u); // 50ms
    4. for (;;)
    5. {
    6. watchDogRefresh();
    7. }
    8. }


    Minimalistic binary to demonstrate problem you can found in attachment. After you will flash this into TI HDK TMS570LC4357, you will able to connect only with on-board XDS100v2 JTAG and TI Uniflash SW.

    Best regards,
    Jiri
    Files

    The post was edited 2 times, last by jiri.dobry ().

  • Hi Jiri,

    Thanks for providing a reproduction binary.
    I could reproduce this issue.
    We will update this thread as soon as a fixed version of the J-Link software & documentation pack is available.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Jiri,

    sorry about the delay in response.
    There will be an update of this thread later this week.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Not sure if there is any fix needed from our side.
    If enabling the watchdog inhibits connecting to the target, I assume the following is the case:
    The watchdog also resets the debug logic of the device, not really good but basically works.
    However, it seems that when J-Link halts the CPU, the watchdog continues running => User configuration mistake

    I am sure, that problem is on JLink, because SignalDigital XDS200 on same JTAG connector works fine.

    I assume that you are using it in TI CCS. So, there are probably some scripts etc. from CCS executed, that reconfigure the watchdog to also halt, when the CPU is halted.


    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.