1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

JTAG Daisy Chain Programming

Discussion in 'AVR' started by riccardo, Mar 2, 2016.

Tags:
  1. riccardo

    riccardo Member

    Joined:
    Apr 15, 2010
    Messages:
    104
    Likes:
    2
    Location:
    United Kingdom
    Hi,

    I have some devices which have an ATtiny1634 on them and an ISP header. I want to be able to program them all at the same time rather than repeatedly plugging in devices and pressing a button. I understand that a "JTAG Daisy chain is the way to go but I'm not sure how to implement it.

    The reference diagrams for connecting up refer to data lines such as TCK and TMS. How do I know which are the relevant JTAG pins on the device so I can set this up?
     
  2. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,253
    Likes:
    961
    Location:
    Loveland, CO USA
    Read the data sheet.
    You can search a .pdf file. Search for JTAG or TMS.
     
  3. riccardo

    riccardo Member

    Joined:
    Apr 15, 2010
    Messages:
    104
    Likes:
    2
    Location:
    United Kingdom
    Duh, It's the first thing I tried. There's no reference to it in the datasheet. Try it yourself.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,253
    Likes:
    961
    Location:
    Loveland, CO USA

    I can see parallel programming.
    I can see SPI serial programming.

    It looks like "low pin count" and older devices don't have JTAG. (parts that use debugWIRE) Your part says "debugWIRE" and SPI.

    I did find this comment:
    On-chip debugging (OCD) support through JTAG or debugWIRE on most devices
    • The JTAG signals (TMS, TDI, TDO, and TCK) are multiplexed on GPIOs. These pins can be configured to function as JTAG or GPIO depending on the setting of a fuse bit, which can be programmed via ISP or HVSP. By default, AVRs with JTAG come with the JTAG interface enabled.
    • ----------------------------------------------
    • debugWIRE
      debugWIRETM is Atmel's solution for providing on-chip debug capabilities via a single microcontroller pin. It is particularly useful for lower pin count parts which cannot provide the four "spare" pins needed for JTAG. The JTAGICE mkII, mkIII and the AVR Dragon support debugWIRE. debugWIRE was developed after the original JTAGICE release, and now clones support it.

      JTAG
      The Joint Test Action Group (JTAG) feature provides access to on-chip debugging functionality while the chip is running in the target system.[23] JTAG allows accessing internal memory and registers, setting breakpoints on code, and single-stepping execution to observe system behaviour.

      Atmel provides a series of JTAG adapters for the AVR:

      1. The Atmel-ICE[24] is the latest adapter. It supports JTAG, debugWire, aWire, SPI, TPI, and PDI interfaces.
      2. The JTAGICE 3[25] is a midrange debugger in the JTAGICE family (JTAGICE mkIII). It supports JTAG, aWire, SPI, and PDI interfaces.
      3. The JTAGICE mkII[26] replaces the JTAGICE and is similarly priced. The JTAGICE mkII interfaces to the PC via USB, and supports both JTAG and the newer debugWIRE interface. Numerous third-party clones of the Atmel JTAGICE mkII device started shipping after Atmel released the communication protocol.[27]
      4. The AVR Dragon[28] is a low-cost (approximately $50) substitute for the JTAGICE mkII for certain target parts. The AVR Dragon provides in-system serial programming, high-voltage serial programming and parallel programming, as well as JTAG or debugWIRE emulation for parts with 32 KB of program memory or less. ATMEL changed the debugging feature of AVR Dragon with the latest firmware of AVR Studio 4 - AVR Studio 5 and now it supports devices over 32 KB of program memory.
      5. The JTAGICE adapter interfaces to the PC via a standard serial port.[citation needed] Although the JTAGICE adapter has been declared "end-of-life" by Atmel, it is still supported in AVR Studio and other tools.
      JTAG can also be used to perform a boundary scan test,[29] which tests the electrical connections between AVRs and other boundary scan capable chips in a system. Boundary scan is well-suited for a production line, while the hobbyist is probably better off testing with a multimeter or oscilloscope.
     

Share This Page