Dear forum members,
I have encountered a problem with the RX complete interrupt.
When I use interrupt system call to handle RX complete interrupts, my STK300 board hangs. When I run the code in simulation mode in AVR studio is appears as if the interrupt system calls is the problem.
Studying the assembler output from gcc for the interrupt system call shows that a SEI is plced first in the system call. According to the mega103 manual I must clear the RXC flag before I can enable the global interrupt again. If not the system will just to the interrupt vector again.
When I patched a nop instead of the SEI in the hex output the software ran just fine, both on target and in simulation. ( I use a sei() call at the end of all my interrupt sutines. )
I am missing something here ? Can I use any flags during compilation or linking to disable the insertion of SEI in the interrupt system call ? Is this a desired behaviour ? Have anyone seen this problem ?