Yahoo Groups archive

AVR-Chat

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

Message

RE: Re: [AVR-Chat] Interrupt routine

2006-01-02 by Larry Barello

IIR the original post mentioned the AT901200 which does not have a normal
stack.  A hard reset would be the only way to "reset" it.


-----------
Larry Barello
www.barello.net


| -----Original Message-----
| From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
| Of Zack Widup
| Sent: Monday, January 02, 2006 3:36 PM
| To: AVR-Chat@yahoogroups.com
| Subject: Re: Re: [AVR-Chat] Interrupt routine
| 
| 
| Your initialization of the chip should include resetting the stack
| pointer.  So if at the end of your interrupt routine you go to the very
| start of the program instead of using "retfie", you're starting completeny
| new and it shouldn't matter.
| 
| Zack
| 
| On Mon, 2 Jan 2006, Moataz Hussein wrote:
| 
| >
| >
| >   Thanks all for your advice, I was meaning start of program i.e. full
| reset.
| >
| >   In a book I have it is mentioned
| >   "When an interrupt occurs the value of the program counter is stored
| in the stack so that the program returns to where it was when the handling
| interrupt is over."
| >
| >   So is it correct that going to the start (rjmp start) at the end of
| the interrupt routine instead of the RETI instruction will not help?
| >
| >   Moataz
| 
| 
| 
| 
| Yahoo! Groups Links
| 
| 
| 
| 
|

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.