[SOLVED] Jtag daisy chain in STM32CubeIDE

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

  • [SOLVED] Jtag daisy chain in STM32CubeIDE

    Hello, I have a 4 identical microcontrollers daisy chain wich seems to work...exept I detect 8 devices?... My setup is the folowing...I have a segger J-link edu mini and 4 wire JTAG. basically I dont got JTRST but NRST connected to the J-link... In tis event should my reset strategy be Type 0:Normal or None?? Boot 0 is shorted to GND.

    Something seems to work, as I can enter the debugging session and get this log below. But my true goal is to precisely select ny microcontroller on this chain and debug this and get to work. I seem to be only able to program tap #auto(position 0?) and position 2... Why IRPre9?? No idea...Saw this in a post.

    J-Link found 8 JTAG devices, Total IRLen = 36
    JTAG ID: 0x4BA00477 (Cortex-M3)
    Connected to target
    Waiting for GDB connection...Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x080004D8 (Data = 0xB580E7FE)
    Read 2 bytes @ address 0x080004D8 (Data = 0xE7FE)
    Connected to 127.0.0.1
    Reading all registers

    Anyways, this is not my main problem, I am just confused as to why I get this effect, no numerical combination of position and IRPre seem to work.
    Any help would be appreciated, Please shed light on this issue?
    Images
    • only.jpg

      86.91 kB, 595×541, viewed 753 times
  • Ahem, excuse me...

    I need help.

    Help me precisely target my microcontroller so I can be on ym way.

    Thank you.
    Images
    • IMG_20201210_032503.jpg

      856.37 kB, 1,944×2,592, viewed 257 times
    • IMG_20201206_193821.jpg

      928.35 kB, 2,592×1,944, viewed 328 times
  • Hi,
    Thank you for your inquiry.

    Please note that this is a community forum and not a support forum.
    If you are eligible for support you can contact us via our support ticket system to speed things up.
    Neither your J-Link Plus (> 1 year old) nor J-Link EDU mini (generally not eligible) are in valid support.
    As the support in this forum is provided by SEGGER developers, we are not able to reply on a daily basis.
    In busy times it might even take a week.

    To answer your question:
    For using the JTAG position, you need to understand how JTAG
    works.
    One MCU/chip may contain more than 1 JTAG device (there may be
    several ones chained inside a single chip).

    For the STM32F2 for example, there are 2 JTAG devices per chip.
    #0 JTAG-DP (debug TAP), IRLen: 4-bit
    #1 STM32 boundary scan TAP, IRLen: 5-bit

    To address a specific JTAG device in the chain, you need to
    specify the position in the chain.
    The position is composed of:
    1) Number of JTAG devices closer to TDO than the one you want to
    communicate with
    2) Sum of IRLen of all JTAG devices closer to TDO than the one you
    want to communicate with
    See here:
    wiki.segger.com/UM08001_J-Link…devices_in_the_scan_chain
    It also comes with some explanations.

    For your case, the chain looks like this:
    TDI -> #7 STM32-BS -> #6 JTAG-DP -> #5 STM32-BS -> #4
    JTAG-DP -> #3 STM32-BS -> #2 JTAG-DP -> #1 STM32-BS ->
    #0 JTAG-DP -> TDO

    You want to connect to the JTAG-DP which is responsible for
    debugging.
    So the following combinations are valid for CubeIDE:
    Position: 0 IRPre: 0 (#0 from above)
    Position: 2 IRPre: 9 (#2 from above)
    Position: 4 IRPre: 18 (#4 from above)
    Position: 6 IRPre: 27 (#6 from above)

    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,
    Good to hear that you are up and running again.

    We will close this thread now.

    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.