This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

No success using 4-Wire JTAG interface and external J-Link debugger.

Other Parts Discussed in Thread: SEGGER, CC3200, UNIFLASH

Hello,

 I’m using a Segger J-Link debugger/probe to develop firmware on the CC3200 Launchpad. Despite everything that I have read about the CC3200 supporting both 4-Wire JTAG and 2-wire SWD interface I have not been able to get the 4-Wire interface to work. Fortunately I have still been able to use the SWD interface successfully.

 I have tried everything I can think of to get the 4-Wire interface to work. My understanding is that the device uses the 4-Wire JTAG interface if the Sense On Power (SoP) inputs are set to either ‘000’ or ‘100’. I have tried both of these settings but the debugger simply cannot find the target device. I’m not certain but it appears that the JTAG TDO pin is always floating (it never changes state despite the presence of signals on the TCK, TI and TMS inputs).

 I’m assuming that the FTDI serial debugger on the launchpad must use the 4-wire JTAG interface because in all the examples that I have seen the recommended jumper setting is to set the SoP inputs to ‘100’ (UARTLOAD, JTAG in 4-Wire Mode).

Has anyone had success using an external debugger with the 4-Wire interface? Or have any suggestions for why all my attempts so far have failed?

 

Thanks

 Steve

  • to get 4 wire mode working with CC3200 and Segger J-Link you need something (a script file for Segger is what we ended up with) to get ICEPick set up correctly to attach JTAg pins to the Cortex M4 core.  SWD does not need this special init as it is the default on powerup of CC3200.

    We got a script file from IAR that worked (somewhat) with EWARM but not sure what your toolchain is.

    Anyway look up ICEPick and CC3200 for some hints. If you have IAR support they should be able to get you a script file that works.

    I gave up on Segger in the end because even with the script there were problems using FreeRTOS with J-Link. I got it working fine with the IAR provided script and no FreeRTOS but never got the combo to work.

    We ended up just using a CC3200 Launchpad for the JTAG device on our custom board - in 4wire JTAG mode as you need to use Uniflash to program the SPI flash and that only requires one jumper change from Uniflash <-> JTAG.

    I also don't think J-Link will work with CCS6 but maybe someone has solved that issue. I wanted to use IAR EWARM.

  • Hi Richard,

    Thank you for your input – that helps a lot. For some reason I had given myself the impression that ICEPick was some kind of debugging probe. Now that you have brought that to my attention I had a quick look through the following and I can see why a script would be required.

     http://processors.wiki.ti.com/index.php/ICEPICK

     I’m using the IDE ‘emIDE’ with the gcc toolchain for my setup but I do have access to IAR’s EWARM. Not sure if I can get support from IAR but I will check. In any case it looks like I will need to spend some time learning more about JTAG, ICEPick and J-Link scripts if I want to get 4-Wire JTAG working. At least I now know it can be done and where to look – as always, if I can find the time!

     Thanks again,

     Steve

  • Thank you Richard!
  • Richard,
    I'm hoping this could related to a problem I'm working on ... could you confirm the jumper change you referred to above, from Uniflash <> JTAG?
    Appreciate the help,
    Regards,
    Manu
  • Maybe this will be more clear about what I was trying to say...

    If you look at the CC3200 Launchpad they have headers for all 3 SOPn (sense on power) boot pins/inputs but we decided we would just use one jumper as only 4 wire JTAG and Uniflash modes were needed. So in our HW design we use the 4 wire JTAG mode as the default for SOPn inputs. These pins are described in TI CC3200.pdf document marked SWAS032F.

    So we have SOP0, SOP1, && SOP2 all pulled low as the default in our HW design so we have intentionally precluded the 2 wire SWD selection on our board.

    To allow Uniflash to be used to program the SPI flash there is a single 2 pin header for a jumper (actually at my desk a small toggle switch is attached to the header pins) to pull SOP2 high (with 3.3vdc) only when I want to use Uniflash to set up the SPI flash. When done with Uniflash the jumper is removed (or switch turned to off) to remove the 3.3vdc and then the JTAG can grab control when board is in JTAG Debug use by the IDE. If not debugging it just goes through a normal POR (power on reset) and runs the mcu image in SPI flash /sys dir.

    BTW SOP2 is pulled down in a way we can also use it as an output AFTER power up to drive an LED driver since the CC3200 is so short of GPIO's. Not sure why the pull down resister value we use was selected so won't mention the value but your HW designers should understand what they need to do to allow the SOP2 pin to be low at boot but still allow it to be used as an output after boot.

    One thing you need to make sure works before going this way is that your SW development toolchain will work in 4 wire JTAG mode. Try things on a Launchpad first. We finally got CC3200 JTAG sort of working with Segger J-Link with an IAR provided script but since CC3200 chip is designed to work by default in SWD mode you need some sort of JTAG setup of ICEPick before you can debug with 4 wire JTAG..

    If you use the CC3200 Launchpad as a JTAG the magic is all done in the LMI-FTDI debug interface built into Launchpad so that is another way to go for a JTAG device.

    I have only tried Segger J-Link and the CC3200 Launchpad as 4 wire JTAG interfaces on custom CC3200 HW.
  • Richard, Thank you. Will try this out in a few hours. M.