Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] code resetting MCU

2005-06-05 by Dave VanHorn

>
>Its the kind of thing that could be hard to track down. I don't know
>of a way for a routine to extract the vector which called it. Write
>such a routine and substitute for the default. Otherwise one is stuck
>writing a unique IRQ service routine for each and every IRQ vector.
>Do something unique in each routine and you'll know which is getting
>dispatched.

Put a panic loop between the vector table and the main code?

Here:
         ;bang I/O pin
         rjmp here


I use a routine called "Pong" a lot, which outputs a byte as PWM, 
where all byte values take the same time.
0s are narrow, 1's are wide.
For something like this, I'd load a unique value into TEMP, and call 
PONG on each ISR, so the output shows the int train.
You need a DSO or logic analyzer to catch it though.

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.