Battling the Heisenbug – Part 2

The problem with the test program turned out to be a lot more mundane then I thought.

The serial port on the Topfield defaults to 115200 baud, the IceLink dongle runs at 9600 baud.

My terminal program is set to its default of 9600 baud which works beautifully for the IceLink, the very first thing the IceLink Interface TAP does is to set the baud rate to 9600, it returns the baud rate to 115200 on exit.

The short version, running IceLink Interface sets the serial port to 9600 so my test program displays as per normal, not running it leaves it in 115200 baud so I get a rubbish character on the screen.

Case closed, move along, nothing to see here….

But seriously..

The moral of the story as is often the case when debugging is this

“If you see hoofprints, look for a horse, not a zebra”

or “Look for the simple solution first, leave the exotic ones for later”

I discovered the true nature of the bug in just a couple of minutes by inspecting the good app and comparing it with the bad. The TAP_Baud function stuck out like dogs balls, I would have noticed it in the first place if it wasn’t 9:30pm after a full day at my day job and a 4 hour session of fiddling with Makefiles, includes etc to get a sane dev environment for the Topfield.

This entry was posted in Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>