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 Kathy Quinlan

David Kelly wrote:
> On Jun 5, 2005, at 10:50 AM, Kathy Quinlan wrote:
> 
> 
>>Hi all,
>>
>>I have a problem with a project. I can see the problem externally, I
>>have a counter that counts from 1 to 255, ticks over to 0 and  
>>counts up
>>again....
>>
>>Sometimes during the operation, the counter resets to 1 and starts  
>>again.
> 
> 
> That sounds a lot like an interrupt vector is undefined by your  
> application and is executing the default vector which is usually the  
> startup/initialization code.
> 
> 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.


This is in CodeVision C, so I am sure all unused interrupts are just 
reti instructions, but I will check :)

Regards,

Kat.

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.