Arduino watchdog timer? Arduino resets self


#1

I was doing testing on the Arduino and needed to freeze it in place but if it doesn’t do its loop Arduino resets itself aft4er about 8 seconds. How does it do that? Does it have a watchdog timer? I looked for a RESET in code but could not find it.

Any idea?


#2

When you say “…and needed to freeze it in place”, what specific steps did you take? If you’ve got the Arduino plugged into the Raspberry Pi and ROS is running, it may be fighting with you for control of the Arduino.

Are you familiar with the way that opening a serial connection can reset some arduino boards: https://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection ? Perhaps ROS is closing and opening the serial port. Have you checked dmseg or /var/log/syslog on the Raspberry Pi for any mention of usb serial port enumeration or general hardware problems?

[edit: Also, what do you mean by “looked for a RESET”? Were you searching for the string “RESET”? That probably won’t help. See https://playground.arduino.cc/Main/ArduinoReset and http://www.atmel.com/webdoc/avrlibcreferencemanual/FAQ_1faq_softreset.html]


#3

Looking at the ROS node code in in the openag_brain repository, there’s some code that says it’s intended to reset the arduino:

Elsewhere in that file, it looks like serial connection problems between ROS and the Arduino might generate diagnostic log messages wherever ROS keeps its logs on the Raspberry Pi.

I haven’t actually run this code, and I’m not an expert on ROS. What I’m saying is just based on being familiar with python, reading the code, and having a rough understanding of the PFC2 system architecture.


#4

wsnook thank you.

The Arduino as setup in a black box that only can be seen through the PI. I hooked up serial1 that output to uart serial to USB converter so we could see on a monitor what the arduino was doing by putting in message in the code. Very helpful for trouble shooting and understanding what was happening.

We wanted to the Arduino code to be stuck in a loop so we could look at IO directly. But when we did that after about 8 -10 second in loop the Arduino was forced into a reset.

I had not realized the opening a serial port reset the arduino, great find. I guess that was obvious because when you use the Arduino monitor it does reset the arduino. Thank you so much for the reference.