Interrupt handling on MSP430

Dear rioters,

I've experienced some trouble with the UART interrupt handling on MSP430 based platforms. After some time of trial-and-error-debugging (only got a TelosB without JTAG here), I've figured out, that the UART ISR wouldn't work neither with nor without the enclosing __enter_isr()/__exit_isr().

Finally, I found that removing the saving of the stack pointer in __enter_isr() would "solve" the problem. [1] Now, test_shell and test_hwtimer seems to work fine, but I still don't understand what's happening there.

When testing on my telosb branch [2] the test_shell application would just reboots after typing any character. I had to use pseudoterm instead of pyterm, since the latter buffers the input. When I changed the __enter_isr() function to not save the SP, everything works fine. Any ideas what causes the problem here? I checked the location to store the SP for a null pointer but it seems to be a valid address.

Cheers, Oleg

[1] [2]