PSOC 3 : Using EEPROM? | Cypress Semiconductor
PSOC 3 : Using EEPROM?
I have what will most likely be a very easy question for some to answer. But, not being a very good bit twiddler I need to ask this:
How do I manage variables of type float in relationship to storing and accessing them in EEPROM? I have byte level access working properly so the basics have been covered.
//Storing the float (wpm is a float) Store it in the Third Row
error = EEPROM_Write((uint8 *)(volatile float CYXDATA *)&wpm,2u);
How do I read the float back from EEPROM?
RegPointer = (reg8 *) (CYDEV_EE_BASE + (CYDEV_EEPROM_ROW_SIZE * 2));
index = 0;
f_wpm = RegPointer[index];
I'm ashamed to ask, but I can't get it to work. I have been able to get the application to work using Emulated EEPROM but I would rather be able to use the EEPROM to store the data that needs to persist over reboots of the device. The version of the PSOC 3 chip I am using has 256K of EEPROM so I know I have more that enough space to do what I need to.