I have not seen the source code but at first glance it seems that the interrupt handler is defined incorrectly.
Interrupt handler definition using
“#pragma interrupt on/off”
can only be used when
the interrupt handler does not call any function/routine and
entire “raw” source code is written inside the interrupt handler.
If at least one function is called from the interrupt handler, the definition above leads to software crash and the HW stack overflow condition.
Solution: Use “#pragma interrupt saveall” before the interrupt handler definition.
Example of correct definition of the interrupt handler:
#pragma interrupt saveall
void HandlerISR(void)
{
/* user source code including function calls */
}