+/** Check the non-volatile storage in the EEPROM for the proper magic value, and erase the parameter area if the magic
+ * value was not correct.
+ */
+static void V2Params_CheckNonVolatileStorage(void)
+{
+ /* Read the magic value from the EEPROM */
+ uint32_t MagicValue = eeprom_read_dword(&EEPROM_Magic_Value);
+ if (MagicValue != EEPROM_MAGIC) {
+ /* If the magic value was not correct, erase the parameter values in the EEPROM */
+ eeprom_update_byte(&EEPROM_Reset_Polarity, 0xFF);
+ eeprom_update_byte(&EEPROM_SCK_Duration, 0xFF);
+
+ /* Write the correct magic value to confirm that the data stored in the EEPROM is now valid */
+ eeprom_update_dword(&EEPROM_Magic_Value, EEPROM_MAGIC);
+ }
+}
+