no EEPROM support for XMEGA by gcc?

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

Is there no XMEGA EEPROM support by gcc yet (eeprom.h)?

Obviously there are things that I have to do on my own (e.g. reading AVR1315). :wink:

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

You are right, there's currently no support in the library.

If you were to write your own support in a similar fashion to the existing eeprom_read/write_???() then perhaps you could submit the work for possible inclusion?

Cliff

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

OTOH, you can directly read and write the EEPROM in an XMega, as the EEPROM is directly mapped into memory space. I argue that you do not need "eeporm.h" support for that.

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

Cliff, I agree that this is a good idea.

But now - after having a closer look at the avrlib stuff and at the application note (AVR1315) - I think that this is not a suitable job for me. My assembler knowledge is not very deep.

In a first step I will use the code of the application note. I will let you (the community) know if I will find any optimizations.

Anyhow, if someone else has something better, I'm still interested. :wink:

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

stu_san wrote:
OTOH, you can directly read and write the EEPROM in an XMega, as the EEPROM is directly mapped into memory space. I argue that you do not need "eeporm.h" support for that.

Yes, you are nearly right. And this is maybe the better alternative than using AVR1315 code. But before accessing EEPROM you have to make sure that the NVM is not busy!

So you have to add something like this before accessing the EEPROM:

while((NVM_STATUS & (1<<NVM_NVMBUSY_bp)));

Thanks for this hint, Stu!