>>>   The solution is to NOT call functions from within your ISR.  That is
>>> just evil.  Get your data in the ISR, put it in a mailbox or buffer
>>> and have a regularly scheduled function handle the details from
>>> outside the ISR.  I like to use ring buffers to store data from an
>>> ISR.  When using the ring buffer the ISR modifies the "write" pointer,
>>> not the read pointer and the processing function outside the ISR
>>> modifies the read pointer and not the write pointer.  This means that
>>> those pointers don't need "push/popped" in the ISR either.

I fully agree on the not calling functions within an ISR, keeping ISR code
as small as possible, and deferring as much processing to outside the ISR.
Plus all of the info on exclusive access techniques and read/write
pointers/indexes is also good.

But the original poster is using a version of gcc that had more than one bad
code generation issue if not properly patched, so even if he were to remove
the function call(s) from within the ISR(s), it is still possible that the
compiler is generating bad code.  He really needs to upgrade or patch the
compiler that is being used under Ubuntu.

-Preston




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to