PDI question

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

I have an Xmega chip and I am using the PDI (by way of a JTAGICE mkII) to program the chip, and that is all working fine. Some of the other features, however, have me a bit puzzled. According to section 30.12 of the Xmega A Manual, there is a way to use the PDI interface (redundant acronym, I know) to write commands and read values directly from the NVM section of the chip. Has anyone successfully tried this, and what tools did you use? I have searched high and low in AVR Studio, and I can't find anything other than how to program the flash.

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

Quote:

Has anyone successfully tried this, and what tools did you use?

Surely it's the same as for any other AVR? In the programming dialog there should be selection/read/write fields both for code flash and EEPROM?

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

There is, and I have read/written both flash and EEPROM. What has me confused is some of the other stuff in that Xmega manual. If I'm reading right (which is admittedly a big if), it looks like I should be able to send NVM commands (compute CRC or read user signature for example) directly from my debugger using this PDI.

For instance, the manual says

Quote:
30.12.1 Enabling External Programming Interface
NVM programming from the PDI requires enabling, and this is one the following fashion.
1. Load the RESET register in the PDI with 0x59 - the Reset Signature.
2. Load the correct NVM key in the PDI.
3. Poll NVMEN in the PDI Status Register (PDI STATUS) until NVMEN is set.
When the NVMEN bit in the PDI STATUS register is set the NVM interface is active from the
PDI.

What does it mean by load {blank} into the PDI? Where is this magical place in memory, and how do I get to it? I've GREPed through the the appropriate ioxXXX.h header file, and the only reference I can find to PDI is one bit in the reset status register.

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

I cant ansver the PDI questions.

But i just noticed some errata with xmega & crc here https://www.avrfreaks.net/index.p...

Just thought i'd mention it. (And note that the old JTAGMKII's doesn't support PDI) , if you ever are in a situation where it doesn't work in "another lab"

/Bingo

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

Thanks for the heads up on the CRC Bingo. I hadn't seen that.