ATXmega128A4-U PDI Interface don't work

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

Hello,

 

This is the first time I work with an Xmega device, so may be that I misunderstand some things with the PDI Interface.

The last 5 years I have worked with Atmega and ATtiny with ISP and JTAG Interface without problems.

 

My Problem is that I can't debug the device, the programming is no Problem.

I use an Atmel ICE and when I told him to "Start Debbuging" over the Atmel Studio 7.0.1417 the ICE program the device with no problems, and on the ICE the led for debbuging flicker.

Normally with an AVR this told me that the Debbuger is working, I can also click the "Break all" Button and then I'm in the program at different Points.

My Problem is that I can't set a break Point, I have also disable all optimize and try to do some debug Outputs, but so there the work is very difficult because the program was not writen by me.

I have to do some modify in the program but the Person in front working on it isn't reachable.

 

I have also check that the Resetline has no capacity and the 10k pull-up for the Clockline is also there.

Do I Need a pull-up for the dataline too, like in an I2C Interface? I can't see there a hint in the documents.

 

I have found some hints that it would be an idea to disable the JTAG, but when I set the JTAG disable Fuse (FUSE Byte 4 = 0xFE) the device will ignore it and the next read is 0xFF.

There is also no Point with the description JTAG. I can only see the PDI in the menu, but in the datasheet there should be a JTAG.

 

I have searched the last two days and have done a lot of Tests, but I can't find a hint why I can't set some breakpoints.

Is this a Xmega Bug?

 

I hope you have a hint to help me, because I have not found a way to to set a break Point.

 

This topic has a solution.
Last Edited: Mon. Oct 23, 2017 - 09:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you read the proper device signature? That is a crucial first step. Reading 0xFF for a fuse byte is quite suspicious, as though you are not really reading anything at all.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Hello Jim

 

Yes the device signature is 0x1E9746 and the target voltage is 3V, that's right for this Project.

I can also read the "Production signatures" without a Problem.

I can read back the Flash and it Looks like the things I have write into it, so I think the Interface should work.

The only Problem is that I can't set a break Point and I don't know why this is the case.

 

I have seen that the CPU should running with the internal 2MHz OSC.

The normal PDI Interface Speed is 4MHz, but I have also changed it to 500kHz and down to 100kHz but it is still the same.

 

Michael

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

Try to create a minimal test firmware. Set optimization to -O1, because often the debugger can't set break points with -O3.

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

Ummy wrote:
I have also check that the Resetline has no capacity and the 10k pull-up for the Clockline is also there.

Do I Need a pull-up for the dataline too, like in an I2C Interface? I can't see there a hint in the documents.

No need for any pull-up resistors.

The 25K ohm typical internal pull-up on RESET(PDI_CLK) is enough.

AVR1612: PDI programming driver

http://ww1.microchip.com/downloads/en/AppNotes/doc8282.pdf

(page 7)

Table 3-1. PDI port interface checklist.

via http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591295

and http://www.microchip.com/wwwproducts/en/atxmega128a1u

 

"Dare to be naïve." - Buckminster Fuller

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ummy wrote:
Is this a Xmega Bug?
Yes if that XMEGA is an "old" XMEGA A1.

Oh ... XMEGA128A4U

Atmel-ICE

Atmel AVR XMEGA OCD Specific Issues

http://www.atmel.com/webdoc/GUID-DDB0017E-84E3-4E77-AAE9-7AC4290E5E8B/index.html?GUID-8A7168ED-3ECD-416A-B7CB-13327652923E

  • For the ATxmegaA1 family, only revision G or later is supported

 

Edit: Oh

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Oct 19, 2017 - 08:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your help.

 

gchapman is rigth with his link. The XmegaA1 Family has there a bug, so that's the reason because it don't work. (AVR Dragon has the same problem)

 

Michael