Arduino Narcopletic Library Results in CPU Resets/Reboots

I’ve been running my lower power arduino using the narcoleptic library for several days now and I keep finding the arduino hung after several hours.

Today I put in code to display where I am to a terminal to see where the hang occurs.

I discovered that the arduino was actually rebooting after several minutes. I removed the call to Narcoleptic.delay and the problem went away.

Past experience with random reset/reboots like this has been caused by the power to the arduino not being clean enough. For the heck of it I put a 47uF cap across the +/- of the 5V power supply. Sure enough no more resets with the capacitor when calling narcoleptic.delay.

My theory is that when the watch dog timer restarts the CPU, it creates enough of a drain, or perhaps some noise, that the normal RBBB caps can’t handle and the controller resets.

Now it just needs to run long term again to see if that fully solves the hang issue (I never saw it actually hang while I was monitoring).

 

Advertisements
This entry was posted in c-arduino, Low Power Arduino. Bookmark the permalink.

One Response to Arduino Narcopletic Library Results in CPU Resets/Reboots

  1. Dan TheMan says:

    BTW, the cap DID fully resolve the hang issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s