Hi guys,

Interesting discussion! I always use global vars to make data availble
to the i2c isr and have to take care when non-byte variables are used.

2013/1/8 Oliver Seitz <[email protected]>:
> The IF flag will be set, even if GIE is not set. For GIE is not set, no
> interrupt will be triggered.
>
> As soon as GIE becomes set, and the corresponding IE (and possibly PEIE) for
> a set IF flag are also set, an interrupt is triggered. At least this is how
> I've always read the datasheets.

Correct afaik.

My view on the matter:

IMHO disabling interrupts is a good way to handle the issue in
specific spaces. User space might be a good place. A procedure might
be an option, but I don't know what the overhead would be when it is
inline. The overhead when it is not inline will be significant.

Downside is that disabling interrupts might cause missing interrupts
and at least will delayed interrupts. Missing interrupts are generally
not acceptable, and delay is not acceptable in some cases (like timing
of intterupt-on-change pins). So disabling interrupts is not an
universal sollution.

The use of a flag and two variables (or maybe a more generic way with
a pool of variables so prevent doubling of the ram used) would be a
nice 'libraray' sollution with no global impact like changing
interrupt timing.

Regards,
Joep

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to