Q on JTAG

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JTAG novice here...
Just built an NKC Electronics JTAG board; mega16-based clone, it says.

I wired up a cable to connect it to the ETT mega128 "stamp" (futurlec.com). Check, rechecked, ohmed out, buzzed wires. All seems correct. Port F pins on the mega128. JTAG board power is coming from the 5V of the target board. The target board works fine for ISP and serial bootloading and running the application. SPI is wired up but I understand that the mega128's JTAG is independent of the SPI.

AVRstudio says it sees the JTAG device on COM1. But it says it cannot see the target device.

I've used my Atmel ISP to ensure that the fuses for JTAG and OCD are enabled (they were).

I have no other JTAG target devices to try but have ordered one. Until then, any ideas on what I may be doing wrong?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure that the JTAG frequency is set to 1/4 of your clock.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Make sure that the JTAG frequency is set to 1/4 of your clock.

er, ah, novice again... I cannot find a setting for that in Studio. I see some sliders for voltage thresholds and so on but these are n/a if the JTAG interface was unable to talk to the target device.

Here's the message I get (though sometimes it says "no target system power")

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you working with voltages other than 5V? If so you will need to use a JTAG chip with an L suffix.

Is the power pin of the JTAG connector conneceted to VCC? (Pin 9) and of course the target need to be on and connected to the JTAG.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this is cockpit trouble. I've made it worse.. thought I found an error in the JTAG cable wiring. Revised. Now I get No Connection. So I'm hosed up here for the moment.

Pin 9 is TDI per the Atmel ICE User Guide.

pin
1 TCK = PF4 on the mega128
3 TDD = PF6 "
5 TMS = PF5 "
7 Vcc (+5)
9 TDI = PF7 "

2 GND
4 Vcc (Tref)
6 *RESET
8 (not connected, nTRST)
10 GND

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Success! JTAG working!
I had power cycled my target and JTAG several times and got Connection Failed from Studio.

So I did the Bill Gates thing: Exit AVR Studio. Run it again. Now JTAG works for the first time. Hmm.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Pin 9 is TDI per the Atmel ICE User Guide.
:oops:..that's what I meant..slip of the finger. Sometimes exiting Studio does help especcially with the Dragon.

Glad it's all working now.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks, John