Christian,
I've done some more testing and put together a little example program that seems to be the minimum necessary to recreate the system hang when using serial interrupts. I quick work around may be for you to immedeately do a putc while inside of your interrupt service routine like so:
void rec() { // Here's my serial interrupt routine.
buf[i]=device.getc(); // Put the character received into the buffer, at place "i"
device.putc('\0'); //<--- this odd line may fix the system hang, but might mess up your device :)
i++; // Increment "i" to make ready for next interrupt
} // interrupt is done.
I'm not sure why, but when I run this test program it seems to work fine if I have a putc in the interrupt routine, but it hangs if I send some bytes from my terminal while it is simultenously sending me stuff... It is kinda interesting to see how the "interrupt_led" actually goes off and even though the system seems hung, it comes on the next time i push a key... I wonder if the putc properly clears the interrupt flag or something different that the getc isn't doing (wild speculation here...)
Okay, hope this sheds some light on the subject, or maybe we're both just crazy and aren't doing something right... *scratch head*
Thanks for any tips!
-John
Hi mbedders.
I'm sorry to post a new topic, as I couldn't find it anywhere else.
I have attached a serial interrupt to my code, and don't know if the interrupt fires when there's a character ready,
or if it just fires when something happens on the line (falling/rising edge).
Could anybody clarify this for me?
/ Lerche