0
\$\begingroup\$

Context

I'm currently working on implementing a Boundary Scan Test (IEEE 1149.1) "plugin" using J-Link debuggers.

The TAP line control is already set up via the J-Link DLL, and I've successfully managed to activate a pin using the EXTEST instruction. However, I’ve run into a behavior that I don’t fully understand.

I'm using the excellent https://github.com/viveris/jtag-boundary-scanner repository as a reference, and with an oscilloscope on my board to observe the exact frames being sent over the TAP lines.

This has helped me get a clearer understanding of the basic operation of TMS, TDI, TDO, and TCK (as this is my first time working with JTAG at this level) and to visualize some already functional frame sequences.

Example: In the image below, you can see the capture of a periodic 20ms task that enables an LED line using the Viveris software.

Periodic ON LED

Breakdown of the periodic frames:

First frame: Set data (Shift-DR) and then set instruction (Shift-IR)

Second frame: Set data

Third and following frames: Set data

As you can see, the LED only lights up after the second frame.

Another Example, In this capture, the periodic task toggles the LED line between ON and OFF:

Periodic Toggle LED

Here we observe a similar pattern — the first frame seems ineffective, while subsequent frames work as expected on the first try.

I understand that the frames that follow the first frame dont need to set the instruction as it has not been changed, it has always been EXTEST. What I dont quite understand is why the first frame doesnt seem to have a practical effect on the pins status.

Question

Is this expected behavior? Why does the first frame (set data and instruction) not affect the current state of the pin, while all the following frames do?

Any help or clarification on this behavior would be greatly appreciated. Thank you!

I've tried following what I feel should be the normal sequence (Set data, set instruction) with no success. I have also tried first setting the instruction and then the data and it does not seem to work on the first try either. At that point I started probing the TAP lines while Viveris software ran to see what the differences were with my software.

asked Apr 22 at 11:17
\$\endgroup\$

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.