|Surveyor Robotics Journal|
Sun, 30 Jul 2006
firmware fix for camera freeze/reset bug
Recent versions of firmware had a problem with the camera locking up and requiring a restart fairly often. As it turns out, this was due to a bug in the firmware, and actually a pretty dumb bug at that. The timing is pretty tricky on the camera module, so we have logic to check whether it's responding on a regular basis, and if it's taking too long to respond, we restart the camera. Basically, we weren't resetting a timeout counter when we got good frames, so after a while (every 25-50 frames), the processor would reset the camera automatically, even if it was operating properly.
If you're working with the source code, it's a single line fix in the vicinity of line 296 of main.c. Just add the following line of code -
retry_count = 0;
just ahead of these lines -
if (decode_jpeg == FALSE) // just dump the captured jpeg, but don't decompress
We've posted an updated version of the firmware as well at
Just download and save as srv1.hex, and follow the instructions on the SRV-1 setup page for uploading new versinos of firmware. Please let us know if you have any problems with this version.
By the way, there's a minor change in the luminance threshold logic in the "wander mode" that's also included in this update. We're doing some other work on the autonomous functions, so there should soon be another update, but we wanted to put the camera bug fix out for testing in the mean time.