I am trying to move some motors around and store their location in the EEPRROM using the EEMEM functions with my Xmega128a1u. The way I initialize my memory locations is as follows.
uint32_t motor1location EEMEM = 0xffffffff;
uint32_t motor2location EEMEM = 0xffffffff;
when I update the location I use.
and then when I try and read back at a later time I use
motloc1 = eeprom_read_dword(&motor1location);
motloc2 = eeprom_read_dword(&motor2location);
motloc1 and 2 are volatile uint32_t variables and ge changed throughou the program. I read them out and I know that they have the correct values, but when I read back the values stored, they are always zero. Worse, when I try zeroing the values using
the first one is set to an arbitrary large number and the second is still zero.
I had this working for just one motor really nicely and when I added the second it started freaking out. What am I doing wrong?