[ABANDONED] CC2642 Chipset is stuck with JLINK debug

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

  • CC2642 Chipset is stuck with JLINK debug

    Hi,

    I'm working on TI CC2642 chipset now, everything is working fine with TI XDS110 debugger. Now, we need to switch to JLINK because of new hardware design, but when I connected JLINK and started debugging, there are more 60% chance that the board will be stuck in exception, I did some trace with OZone, and also talked to TI support engineer, the conclusion is the reset with JLINK not fully cold reset which causes some timer, uart interrupt not be cleared up completely. I also tried to toggle the reset pin of CC2642, then attach the JLINK to device, it's working fine. I'm not very family with the JLINK script, so my question is if there is any way to use OZone to debug this with togging ResetPIN for resetting device?

    Any response will be appreciated.
  • I did some investigation to try to do reset type 2 (ResetPin) with OZone, here are some what I found:

    1. Segger GDB supports the command "monitor reset 2" to enforce this reset type. But I don't find the way to issue this command in OZone.

    2. From J-Link Script's description, looks like we can use "Global DLL Variables" to set PIN state in project file:

    Source Code

    1. JTAG_ResetPin = 0;
    2. SYS_Sleep(3);
    3. JTAG_ResetPin = 1;

    But above code report failure when I tried to perform reset:

    Source Code

    1. Error (83): Script interpretation failure: unknown identifier "JTAG_ResetPin" at line 96, column 5.
    2. Error (83): Script interpretation failure: syntax error at line 96, column 5.
    Would you give me some suggestion what's the right way to do it?
  • [ABANDONED] CC2642 Chipset is stuck with JLINK debug

    Some other trial according to wiki.segger.com/Changing_J-Link_Reset_Strategy, but looks like there is no change.

    I did some some measurement, I do see some toggled reset signal on ResetPIN:

    1) Attach Device: There is 50-ms pulse detected.

    2) Reset Target: There are 2 50-ms pulse detected.


    I tried to manually set ResetType to 2 with below JLinkScirpt:

    Source Code

    1. int ConfigTargetSettings(void) {
    2. JLINK_SYS_Report("-- Configure Reset Strategy to 2--");
    3. JLINK_ExecCommand("SetResetType = 2");
    4. return 0;
    5. }
    And add it into OZone to call it in "BeforeTargetConnect", I can see the above logs, but the pulse on reset pin doesn't change.

    So my question is if there is some other function to set the pulse width, e.g., 500ms? According to my test, 500ms is good enough to fully power cycle the device.
  • Hi,
    Sorry for the delay in response.

    The CC2642 has a device specific reset implemented.
    This reset is a reset via reset pin.
    However, there are some additional steps executed (resetting TAP, initializing ICE-Pick, Halt after bootloader,...).

    During reset, the reset pin is toggled twice for 50ms (as you already found out).
    This should be sufficient for the device to fully reset.
    Even though this might not change anything,
    I uploaded an adjusted, compiled script file for this device here (reset pin toggle after reset is 500ms):
    download.segger.com/Fabian/220506_TI_CC2650_PCode.zip
    Does this solve the issue?

    Best regards,
    Fabian
    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 Fabian,

    Thanks for your support. I tried your script in "BeforeTargetConnect", but the reset pin width is still 50ms as attachment showing.

    And here are the logs from OZone:

    Source Code

    1. Disconnected from target device.
    2. Debug.SetConnectMode (CM_DOWNLOAD_RESET);
    3. Debug.Start();
    4. Project.SetJLinkScript ("./TI_CC2650_PCode.pex");
    5. Executed J-Link command "ScriptFile=./TI_CC2650_PCode.pex"
    6. Device "CC2642R1F" selected.
    7. InitTarget() start
    8. InitTarget: Found ICE-Pick with ID: 0x3BB4102F
    9. InitTarget: Found CPU TAP 0x4BA00477
    10. InitTarget() end
    11. DPv0 detected
    12. Scanning AP map to find all available APs
    13. AP[1]: Stopped AP scan as end of AP map has been reached
    14. AP[0]: AHB-AP (IDR: 0x24770011)
    15. Iterating through AP map to find AHB-AP to use
    16. AP[0]: Core found
    17. AP[0]: AHB-AP ROM base: 0xE00FF000
    18. CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    19. Found Cortex-M4 r0p1, Little endian.
    20. FPUnit: 6 code (BP) slots and 2 literal slots
    21. CoreSight components:
    22. ROMTbl[0] @ E00FF000
    23. ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    24. ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    25. ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    26. ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    27. ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    28. Connected to target device.
    29. ResetTarget() start
    30. ResetTarget() end
    31. Elf.GetBaseAddr(); // returns 0x0
    32. Target.ReadU32 (0x00000000); // returns 0x2000D0D0
    33. Target.SetReg ("SP", 0x2000D0D0);
    34. Elf.GetEntryPointPC(); // returns 0x149C8
    35. Target.SetReg ("PC", 0x149C8);
    36. J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (16384 bytes)
    37. J-Link: Flash download: Total: 0.456s (Prepare: 0.050s, Compare: 0.268s, Erase: 0.023s, Program & Verify: 0.106s, Restore: 0.006s)
    38. J-Link: Flash download: Program & Verify speed: 150 KB/s
    39. Elf.GetBaseAddr(); // returns 0x0
    40. Target.ReadU32 (0x00000000); // returns 0x2000D0D0
    41. Target.SetReg ("SP", 0x2000D0D0);
    42. Elf.GetEntryPointPC(); // returns 0x149C8
    43. Target.SetReg ("PC", 0x149C8);
    44. Startup complete (PC=0x0000D8AC)
    45. Debug.Stop();
    46. Disconnected from target device.
    Display All
    Images
    • reset.png

      3.15 kB, 231×193, viewed 265 times
  • Hi,
    Are you using JTAG or CJTAG? In case you are using CJTAG, it should work with JTAG.

    BR
    Fabian
    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.