> >If I could Test (save) and Disable Interrupts with an indivisible > >instruction, run the process then return the original Global > >Interrupt state I would feel a bit safer... > > No REALLY sure what you are trying to do but here we go.... > There are no INVISIBLE instructions...that I can see...... :-) And that would be sort of an oxymoron.. :) He meant "atomic", but he did say "indivisible" > but you can save the status register (SREG), do testing on bits or > whatever, and then restore the status register which SHOULD re enable > interrupts. something like in temp,sreg cli (do stuff) out sreg,temp ; This might be a case where doing it a little differently would work better. Remember too, that if you're IN an isr, that ints are disabled till you RETI, unless you sei them yourself, which I've never had to do.
Message
Re: [AVR-Chat] ATmega128, flags, semaphores and interrupts
2007-08-02 by David VanHorn
Attachments
- No local attachments were found for this message.