After some intensive investigation, we tracked down the issues to the interrupts. The default code has this defined:
Code:
#pragma code
#pragma interruptlow InterruptHandlerLow save=PROD/* You may want to save additional symbols. */
void InterruptHandlerLow ()
however, as we were calling functions inside the interrupt handler, it ended up corrupting one the registers, so changing that to:
Code:
#pragma code
#pragma interruptlow InterruptHandlerLow save=PROD, section(".tmpdata") /* You may want to save additional symbols. */
void InterruptHandlerLow ()
made it work properly so far. Thanks for the help!