Data in Arduino UNO's EEPROM changes after 3-4 days randomly

So what can happen (only after a reset of the board)

  1. Pin 3 is initially floating and a change is detected; the corresponding flag in the External Interrupt Flag register is set.
  2. You set the pin to internal pull up.
  3. You use attachInterrupt to enable the interrupt.
  4. Because the corresponding flag in the External Interrupt Flag register is set in (1), the ISR is triggered.