3

There are several mandatory JTAG instructions to use for boundary scan. I have learned, we can change pin states of MCU or CPU by using that instructions. However, I could not find any detailed information about it. How can I change pin states with JTAG? Which instructions should I use? I want to program an external flash by using that property.

MIrchhh
  • 31
  • 1

1 Answers1

2

The JTAG circuit elements are embedded into the design of the chip which supports it. The boundary scan feature and ability for JTAG to access the pins is by hijacking the control from the MCU and being the middle-man between it and the outside world. This allows for full hardware testing with a blank MCU in a large digital system which is really cool for Quality Control and testing processes prior to bringing up a MCU with firmware for the MCU's round of self-testing.

The JTAG interface like I said is a sort of integrated logic module which sits between the MCU and each of the the external pins/ports.

I suggest you read more about the JTAG interface and the instruction set. The good part is that any MCU or device which supports JTAG is meant to be consistent and standard in the way they interface with JTAG. Read the documentation and play around with it!

KyranF
  • 6,248
  • 16
  • 25
  • Thank you for your quick reply. I have read documents for JTAG . I guess, Sample/Preload and Extest instructions are used for that purpose. However, I am not sure that is true. I want to program any device by changing pin states with a given logic. There is a software in [link](http://www.topjtag.com/flash-programmer/) but it does not get any logic. It needs only full pin info. When I have a latch in my circuit I can not use that software. So I should develop my own programmer. – MIrchhh Sep 02 '15 at 08:46
  • 1
    You use the EXTEST-instruction to be able to control the pins of the device which then gives you access to external devices like that FLASH in your case. There are commercial tools available to do that. – og1L Sep 02 '15 at 10:41
  • 1
    Commercial tools that I found wants only pinout information. I could not input a logic to control latch to use same pins for address and data inputs. So I need to develop my own software that can control pins with a given logic. – MIrchhh Sep 02 '15 at 12:07
  • 1
    Usually these tools load in some form of netlist and have definitions/models for other non-Boundary Scan devices as well which then allow handling of buffers/logic and also multiplexed address/data-buses as you describe. Google "Boundary Scan" and you will find the big five. But be prepared that those are quite a bit more expensive then the $100-one you linked. – og1L Sep 02 '15 at 15:02
  • 2
    @MIrchhh: There's a good reason that vendor tools for programming companion flash chips generally do so by downloading helper software into the MCU and executing it -- software running in the MCU is able to achieve much higher throughput to the external memories than using JTAG for boundary scan control of the same pins. – Ben Voigt Oct 02 '15 at 14:38