simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] Re: interrupt flag/enable bits update


From: John Regehr
Subject: [Simulavr-devel] Re: interrupt flag/enable bits update
Date: Fri, 28 Nov 2003 22:07:47 -0700 (MST)

> Most notably changing NO_BIT to 0's instead of -1. I think this is preferred
> since the table entries that are not explicitly initialized are implicitly
> initialized to 0 anyways.

Sounds good!

> I also noticed the the USART1 flags where at the wrong address (0x9a instead
> of 0x9b). I'm assuming that was just a copy/paste error.

Yeah, my eyes were seriously glazing over after looking at the Atmel
manuals for a few hours...

> One last question. I noticed that the .SPI_STC flag is always set to NO_BIT
> even though there is a SPIF flag bit. From the datasheet for the mega128:
> ...
> This seems a little problematic. I think you are right not to define the
> flag by default. To handle this properly, it looks like the SPI VDev is
> going to have to modify the vector table when the SS condition requires it.
> Want do you think?

I'm not sure.  My inclination would be to define a flag bit in the
IntVectTable only when the semantics of the flag are absolutely standard.
As long as this is true for a lot of interrupts, then it's a win overall.
There are a few int sources like SPI that are just going to require
special code and it seems like this code is much better off placed in the
SPI code than in the interrupt code, if that makes sense.

John





reply via email to

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