Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] WatchDog Timer

2009-07-21 by David VanHorn

> So how does one record information to determine where the bug might be in a
> situation where it is very difficult to reproduce the conditions that caused
> the software hang?
>
> I can have the application leave 'breadcrumbs' at different points but this
> would either take a lot of time to narrow in on or take a lot of
> 'breadcrumb' code.


I do this for some applications.
I have a task buffer and an ISR buffer, which are write-only circular buffers.
Any significant task that starts (not one that gets called and decides
not to run) puts an entry in the task buffer.
Any ISR that starts puts an entry in the ISR buffer.

On a reset, I can use the ice to breakpoint and read out the buffers.
In some apps, I've used the serial port to send "last task", "last
ISR" and "reason for reset" when it's waiting for the boot loader
magic word.

It all depends on what you need, and how much ram you can spend on it.


-- 
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.