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:
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:
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
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
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:
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!