[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] How to handle interrupt vectors ?

From: Charalampos Alexopoulos
Subject: Re: [avr-gcc-list] How to handle interrupt vectors ?
Date: Wed, 29 Oct 2008 20:43:01 +0200
User-agent: Thunderbird (X11/20080421)

Gre7g Luterman wrote:
> *> From:* Charalampos Alexopoulos <address@hidden>
> *> To:* address@hidden
> *> Sent:* Wednesday, October 29, 2008 12:12:00 PM
> *> Subject:* Re: [avr-gcc-list] How to handle interrupt vectors ?
> >
> > I was asking for information about interrupt vector's not for ISR. Yes i
> > have seen the code for the ISR and i have no understanding of the
> > mechanism because i don't know what that vector is. It is very obvious
> > that foo::mumble is not working, thats why i am asking for help.
> It sounds to me like the problem we're having here is communication,
> not so much a programming issue. I'm gonna' take a wild shot at this,
> so if I'm way off base, please don't scold me!
> If your background is not programming AVR's, then you may be
> accustomed to keeping your interrupt vector list in RAM. In such a
> case, you would need your code to set a given vector so that
> interrupts are handled by the correct routine.
> In AVRs, this vector table is kept in Flash. You don't actually call a
> function with a vector number to set anything. The compiler (OK, the
> linker actually) looks at your code and if it recognizes a
> familiarly-named function, then it puts that vector in the table. This
> is done at compile time, not at run time. You never actually call
> anything with a parameter indicating which vector.
> So you may be talking interrupt vectors, but we're talking ISRs. You
> need to identify what happens when that vector is called, create a
> function to hold that code, and correctly name the function so that
> the compiler will handle it correctly. There is no way (short of doing
> a Flash write) to change an interrupt vector in your code.
> ... Let the flames begin. :)
> Gre7g
> ------------------------------------------------------------------------
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
before i identify what happens when that vector is called i have to
decide what i want to happen and before i decide that i need to know
what that vector is. I don't want to change anything at run time. All
the work will be done at compile time. What i want is the information be
part of a class in a constant way. I know that it can't be a normal
constant because ISR is handled by preprocessor  and a constant member
of a class get its value at compile time. Anyway all this is just to
talk something about because what i want to know is some information
about interrupt vectors. Until few days before i didn't know that
vectors exist in c , since then i have learn some thinks and i want to
learn more, so i decide to ask in a site that maybe somebody have a
specific knowledge in the vectors of my interest.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]