EEPROM write and read, error

#include <EEPROM.h>
#include <TimerOne.h>

const int timerInterruptLed = 13;
int addr = 0;
int val = 1;

volatile int y = 0;
int x = 1;

volatile boolean onOrOff = HIGH;        //Set led on or off inside the ISR
volatile unsigned long functionCounter = 0; //Count how many times the function is called

unsigned int motherLoopCounter = 0; //To pick up the value of the function loop

void setup() {
  Serial.begin(9600);
  Serial.println("Hi! Timer program is running!");
  pinMode(timerInterruptLed, OUTPUT);
  Timer1.initialize(2000000); //2 million microseconds is 2 seconds
  Timer1.attachInterrupt(function);
}

void loop() {
  EEPROM.write(addr, val);
  TIMER();
}

void TIMER() {
  while (x > 0) {
    digitalWrite(timerInterruptLed, HIGH);
    byte Minutes = EEPROM.read(addr);
    y = (Minutes * 30);

When I print the value of Minutes, instead of getting 1 as my output I keep getting 253. What am I doing wrong?

Your code is not complete.

sterretje: Your code is not complete.

The other parts of the code were not essential to the question and hence, I didn't post it. I tried changing the EEPROM location to anything but 0 and the code now works fine. Any clue as to why there is an error if I store to EEPROM(0)?

Thank you @sterretje for responding.

What type does EEPROM.write() take as the address argument? What type are you supplying? What type does EEPROM.write() take as the value argument? What type are you supplying?

What happens when you supply the wrong types?

What type does EEPROM.read() take as the address argument? What type are you supplying? What type does EEPROM.read() return? What type are you storing the result in?

What happens when you use the wrong types?

You really should be using the correct types everywhere.

PaulS:
What type does EEPROM.write() take as the address argument? What type are you supplying?
What type does EEPROM.write() take as the value argument? What type are you supplying?

What happens when you supply the wrong types?

What type does EEPROM.read() take as the address argument? What type are you supplying?
What type does EEPROM.read() return? What type are you storing the result in?

What happens when you use the wrong types?

You really should be using the correct types everywhere.

They take int data types for the address and the value, right?
EEPROM.read returns a byte value, if I understand correctly.

They take int data types for the address and the value, right?

No, that is not right. RTFM again.