Custom interrupts enable GIE too early
Posted: Thu Jan 29, 2015 5:16 pm
I reviewed the assembly output for one of my PIC projects using FC 6.1.1.0, specifically the code generated for a custom interrupt, and noticed that the GIE flag gets set before the interrupt is setup. This means that the code setting or intializing the interrupt runs after the global interrupt flag is set i.e. after all interrupts are enabled. This may cause some initial, sporadic and unexpected behaviour. Should this not be placed instead just at the end of setting up the interrupt right after the PIE is enabled for example?
I also checked similar code for some of the predefined interrupt sources, such as timer 0, and found that the GIE is handled as expected, so ti apperas that just the customs interrupt code is affected.
Is it possible to make a note of this and correct in future releases?
I also checked similar code for some of the predefined interrupt sources, such as timer 0, and found that the GIE is handled as expected, so ti apperas that just the customs interrupt code is affected.
Is it possible to make a note of this and correct in future releases?