jtagice3 How to debug Atxmega256A3BU-xplained board

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

AS6 (1882) WinXP. Programs ok, but I can't debug. Any ideas?

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

"I can't debug" is not a lot to go on?

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

So if you can program then you can connect to the board. So what message to you get when you try to debug ?

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

The error message is:

Failed to launch Program

Error PDI enable failed. Debbugger command Activate failed.

I found this thread on the XMEGA forum.

XMEGA forum - PDI does not work on XPLAINED -A1 board & JTAGICE MkII

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

Can it be this?

Atmel AVR1923: XMEGA-A3BU Xplained Hardware User Guide wrote:
Because JTAG TDO and PDI DATA are connected on the PCB for this kit, JTAG must be disabled on the device in order to use PDI. The reason for this is that when JTAG is enabled it will enable a pull-up internally on TDO which interferes with the PDI initialization sequence.

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

snigelen wrote:
Can it be this?
Atmel AVR1923: XMEGA-A3BU Xplained Hardware User Guide wrote:
Because JTAG TDO and PDI DATA are connected on the PCB for this kit, JTAG must be disabled on the device in order to use PDI. The reason for this is that when JTAG is enabled it will enable a pull-up internally on TDO which interferes with the PDI initialization sequence.

Also here: http://www.atmel.no/webdoc/xmega...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

Now I am able to set breakpoints and debug.

I disabled the JTAGEN fuse, using the JTAGICE3 in JTAG mode.

restarted the JTAGICE3 via tools -> device programming.
selected PDI, could read the device and program the board.

Thanks

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

But why would you want to use PDI for that board when JTAG works out of the box with the Mk3?

Are you trying to save a few pins for something? Or is it a case of just wanting to try out PDI?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I would like to use JTAG, but it isn't working for me. The PDI is working. What is "MK3"?

What I would like is a manual or tutorial. The user guides are limited.

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

Quote:
What is "MK3"?
Your jtagice3. I'm using it right now with the Atxmega256A3BU-xplained board in JTAG mode.

If anything PDI should not work as it needs a link cut at the back of the board which is clearly marked.

Everyone at the Atmel Tech on tour on Thursday used the jtagice3 in JTAG mode.

edit I see your problem "I disabled the JTAGEN fuse, using the JTAGICE3 in JTAG mode." therefore it can't work. But it DID work as it allowed you to disable that fuse.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I started this saying I could program in JTAG ok, just couldn't debug. You see the error message.

I saw the note about cuting the trace for PDI, I didn't cut and it works just fine for degugging and programming.

Tomorrow, I will go back to JTAG and try again.

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

Solved: Need to set the JTAGICE3 to JTAG in project -> properties (not options as in the AS6 help).

Now I can debug in JTAG.

Thanks John Samperi for insisting that it works in JTAG.

I had looked under Debug properties, but only the ATMEL simulator is listed.

BTW: Only need to cut the PDI/JTAG trace if you want to use the pin with an application. Since it is either JTAG or PDI, no problem (see JTAGICE3 HW User Guide).

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

Quote:
Need to set the JTAGICE3 to JTAG in project -> properties
I was going to suggest that next but when I saw your post I was reading it on my mobile, not very good to type stuff with. :-)

Glad it's all working, now I will need to do some tests on my board in PDI mode since it works without cutting the track.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Results of my tests in a new thread https://www.avrfreaks.net/index.p...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly