Unexpected Interrupt

I recently have started to get an “unexpected interrupt” error in my DynamicC version 9.21 code running on a Fox LP3500 7mHz board. The exact error is:

Run Time Error: Unexpected Interrupt.
File: LP35XX.LIB
Line 516

Line 516 in file LP35XX.LIB is the last line of the function _ads7870driver. This supports the 7870 analog to digital converter chip that I am not explicitly using.

This error is not consistant. Sometimes it takes many minutes to occur. Other times it happens within the first minute.

Has anybody else had this problem? What might the likely causes be?

-Skye

I have learned some more in the last day. I went back very carefully to a place where the code was assumed to work. Running it overnight confirms that this point in time was good. Slowly advancing the state of the code to what I have now found that the problem started up when we changed the output from serial port D to port E.

We are talking to an external device on port E at a baud rate of 115200.
We are transmiting using RS-232 CMOS levels and converting to RS-422 with an external part (Maxim 3490). This worked fine when using Port D.

Why might we be getting Unexpected interrupts when using portE?

-Skye