Monday, February 19th 2018, 8:37pm UTC+1

You are not logged in.

  • Login
  • Register

elektroll

Beginner

Date of registration: Dec 18th 2017

Posts: 5

1

Wednesday, February 7th 2018, 9:43am

How to do a simple JTAG (boundary) scan?

Hello,
i use a Segger J-Link EDU and want to explore an unknown system providing a JTAG connector. The connections are all done and documented, but i don't know what the system provides.
So my thought was to test device by device by getting it's ID and do a lookup.
How can, how should i do this?
In my current understanding of JTAG each device should send it's device ID when a special command is send to it.

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 699

2

Wednesday, February 7th 2018, 10:37am

Hello,

Thank you for your inquiry.

If you simply want to test a JTAG boundry scan, our free application JTAGLoad from the J-Link software package can be used.
More information can be found in the J-Link user manual.
Should you need a custom application for more advanced JTAG features J-Link SDK needs to be purchased separately: https://www.segger.com/products/debug-pr…ogy/j-link-sdk/

Best regards,
Nino

elektroll

Beginner

Date of registration: Dec 18th 2017

Posts: 5

3

Thursday, February 8th 2018, 9:04am

What i want to do is to learn how it works on a veeery basic level. So is it possible to set the TMS/TCK/TDO/TRST lines like i want?
jtagload.exe expects VSF commands in scripts, which are some sort of "highlevel" also.
Maybe there are instructions inside jlink.exe (Commander), but i am not shure.

To get the concepts right, i need to set the values by hand and if this works go to next level using meta-commands doing all the dirty groundwork for me ;-)

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 699

4

Friday, February 9th 2018, 11:29am

Hello,

Quoted

What i want to do is to learn how it works on a veeery basic level. So is it possible to set the TMS/TCK/TDO/TRST lines like i want?

Yes but only with the J-Link SDK.

Quoted

Maybe there are instructions inside jlink.exe (Commander), but i am not shure.

This is currently not possible with generic commands that are publicly available in the J-Link user manual.

Best regards,
Nino

elektroll

Beginner

Date of registration: Dec 18th 2017

Posts: 5

5

Saturday, February 10th 2018, 5:11pm

You're wrong about the lowlevel signalling in J-Link commander. These commands can set/unset the lines manually:

t0 => Set TMS to low
t1 => Set TMS to high
0 => Set TDO to low (i think it's documentation errero, because it's called TDI which would make no sense to SET an INPUT ;-)
1 => Set TDO to high
c => Cycle TCK one pulse

Normally that would be sufficient. If i write it to a script and call it on startup of jlink.exe it seem to work. When connecting an Logicanalyzer i can find the statemachine transisitons. The only thing is, that if i set the device to BYPASS i can't see any changes von TDI. It's always 1. So after i put TAP in BYPASS and exec "0" to set TDO to low, after a few cycles with "c" i expect a "0" as result, but it never come. Even after hundrets of 0's.

Another test was to use jload.exe like you mention. This is more high-level and has some implications. For example: it will issue commands to got to IRCAPTURE itself. Also i had trouble using the syntax, but stay tuned ;-)

P.S.: You're very business-minded as you always mention SDK. Well, i'd like to learn and as a student i do not have 800 bucks for a software development tool. In my opinion this should be free, because it belongs to the testprobe...

This post has been edited 1 times, last edit by "elektroll" (Feb 10th 2018, 5:13pm)


SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 699

6

Monday, February 12th 2018, 10:06am

Hello,

Quoted

You're wrong about the lowlevel signalling in J-Link commander. These commands can set/unset the lines manually:

Yes you can set them low or high that way, but this functionality is not intended to send JTAG data back and forth but it is solely meant to be used for pin testing. Any other use might not work and is not supported. That is why it is not documented in the J-Link user manual.

Quoted

You're very business-minded as you always mention SDK. Well, i'd like to learn and as a student i do not have 800 bucks for a software development tool. In my opinion this should be free, because it belongs to the testprobe...


It enables advanced features for the debug probe where significant developement time was invested and which only a very small number of customers need. We could include it into the debug probes but then every J-Link and J-Trace would become more expensive in the process for a feature set that over 99% of our customers don't or need. This would make most of our customers rather unhappy. So the current solution is the best compromise.
If you want to use the SDK for a university project get in touch with your university. They can acquire such a license and make it available to all their students.

Best regards,
Nino