user53015: I am using Atmega328p with 5V power supply,
My Arduino getting hangs [or auto restarts] after some times.
I am using libraries:

Wire.h
CRC32.h
EEPROM.h 
Arduino.h 
TimerOne.h 
RtcDS3231.h 
SoftwareSerial.h 
Adafruit_NeoPixel.h 
avr/wdt.h

I have tried to search, some people are deny to use software serial library.


user52961: Not sure if this will fix your problem, but this is a major error:
  char buf1[8], buf2[6];
  sprintf(buf1, "%08lu", myvote.mydate);
  sprintf(buf2, "%06lu", myvote.mytime);

Take a look at sprintf function reference

A terminating null character is automatically appended after the content.

So, the text buffers are too small. It should be at least:
char buf1[9], buf2[7];


53015: <p>I am using Atmega328p with 5V power supply,
My Arduino getting hangs [or auto restarts] after some times.</p>

<p>I am using libraries:</p>

<ul>
<li>Wire.h</li>
<li>CRC32.h</li>
<li>EEPROM.h </li>
<li>Arduino.h </li>
<li>TimerOne.h </li>
<li>RtcDS3231.h </li>
<li>SoftwareSerial.h </li>
<li>Adafruit_NeoPixel.h </li>
<li>avr/wdt.h</li>
</ul>

<p>I have tried to search, some people are deny to use software serial library.</p>

<p><a href="https://i.stack.imgur.com/s2pe8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s2pe8.png" alt="enter image description here"></a></p>
 52961: <p>Not sure if this will fix your problem, but this is a major error:</p>

<pre><code>  char buf1[8], buf2[6];
  sprintf(buf1, "%08lu", myvote.mydate);
  sprintf(buf2, "%06lu", myvote.mytime);
</code></pre>

<p>Take a look at <a href="http://www.cplusplus.com/reference/cstdio/sprintf/" rel="nofollow noreferrer">sprintf function reference</a></p>

<blockquote>
  <p>A terminating null character is automatically appended after the content.</p>
</blockquote>

<p>So, the text buffers are too small. It should be at least:</p>

<pre><code>char buf1[9], buf2[7];
</code></pre>
