I have found that if an interrupt enable is placed within another interrupt, it does indeed cause issues.
For example, it can restart all the code.
What I would do if I were you is to enable timer2 only once just below the enable INT0 enable icon .
Then just after the enable Timer2 icon, place a C code block with
Code: Select all
cr_bit(PIE4,TMR2IE);
Use that c code to replace all the timer2 disable icons.
Then I would replace all the timer2 enable icons with a c code block containing
Code: Select all
st_bit(PIE4,TMR2IE);