XMEGA E EEPROM - NVM Controller

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

Hello All,

 

I have been working on assembler routines for accessing the ATxmega32E5 EEPROM, and have been referencing the XMEGA E Manual and application note AVR1315.  So far, I have been UNable to find a complete list of NVM commands and operational requirements.  Can any of you provide a link to such information, or provide the information itself?  As usual, the documentation appears to by lacking . . .

 

Questions have arisen:

 

1. When loading the EEPROM page buffer, must I issue the NVM command 'load page buffer' before every data write?  Or may I issue the command once, and just write the data one byte after another?

 

2. Is there a way (NVM command?) to read the contents of the EEPROM page buffer?  Is there any way to determine which bytes are tagged for write or erase?

 

3.  Does the flush buffer command tag every byte in the buffer?  I would like to avoid erasing a location that already contains $FF.

 

Additional suggestions and advice welcome.

 

Thanks in advance.

 

Altazi

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

Is the description in the data sheet insufficient?

 

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

Hello Kabasan,

 

Thank you for responding to my post.

 

Sadly, no, that information does not answer my questions.  I have been referencing the XMEGA E-series manual, the datasheet, and AVR1315 application note.  Unless I have missed something - which is entirely possible - I haven't been able to find answers to my specific questions.

 

It seems that I must stumble about in the dark, trying things and hoping for success . . .

 

Altazi

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

1. The NVM command "load page buffer" does not exist.

2. No.

3. The NVM command "flash buffer" does not exist.

 

I agree that the xmega documentation is esoteric.

 

This is to set the EEP address in NVM.ADDR (0-2) and write bytes to NVM.DATA0.
For mapped EEPROM, just write a byte with the ST instruction.
Only the bytes written update the EEPROM with the next instruction, and the parts not written are not changed.
If you cannot trust that the page buffer is cleared, run the NVM command "ERASE_EEPROM _BUFFER" prior to this.

 

Execute the NVM command "ERASE_WRITE_EEPROM_PAGE".
The page buffer is cleared at this time.

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

kabasan wrote:

1. The NVM command "load page buffer" does not exist.

2. No.

3. The NVM command "flash buffer" does not exist.

 

I agree that the xmega documentation is esoteric.

 

This is to set the EEP address in NVM.ADDR (0-2) and write bytes to NVM.DATA0.
For mapped EEPROM, just write a byte with the ST instruction.
Only the bytes written update the EEPROM with the next instruction, and the parts not written are not changed.
If you cannot trust that the page buffer is cleared, run the NVM command "ERASE_EEPROM _BUFFER" prior to this.

 

Execute the NVM command "ERASE_WRITE_EEPROM_PAGE".
The page buffer is cleared at this time.

 

Thank you for your response.  I am writing code to test this now.  Since it appears that the E-series devices have EEPROM automatically memory mapped, using an indirect ST+ instruction to load the EEPROM page buffer would be most convenient.

 

It seems that the documentation was written for people who already understand the operational details of the NVM controller and EEPROM programming.  Alas that I am not yet numbered among that group.

 

Altazi