DisableContextSaving
DisableContextSaving
It you be nice if you could just disable context saving for only the high priority interrupt and let the compiler look after saving everything in the low priority interrupt. I have high priority interrupt that can be triggered frequently (13uS in fact) that is written in assembler and uses the fast return stack. Without the disable context saving directive the compiler adds about 10 times more code than my routine to save/restore things that I don't use. I also have a low priority interrupt for everything else and that's written mainly in Pascal. Because the compiler re-uses all its Rx temporaries you have to hunt through the assembly listing to figure out what needs to be saved. This can easily introduce very hard to find bugs as minor changes to the low priority interrupt can easily introduce an additional Rx reference.
Re: DisableContextSaving
did you consider looking in the help ? Check what is provided on the subject of interrupts.
Au royaume des aveugles, les borgnes sont rois.
Re: DisableContextSaving
Yeah, like the DisableContextSaving directive implemented to be only effective locally (in the ISR it's placed), not globally as it is now.ashley wrote:It you be nice if you could just disable context saving for only the high priority interrupt and let the compiler look after saving everything in the low priority interrupt.
Re: DisableContextSaving
JPC. Not really sure what your point is. As far as I'm aware the help mentions no way of disabling context locally (i.e. in the high priority interrupt routine but not the low priority), and provides no guidance into which registers need to be saved if context is disabled. If I've missed something please point it out.
Re: DisableContextSaving
i misunderstood the original question, thought you just missed the disablecontextsaving function as provided but now understand you wanted a selective disabling on the high priority only .
Au royaume des aveugles, les borgnes sont rois.
Re: DisableContextSaving
Hi,
The disablecontextsaving disables context saving for both high and low priority interrupts.
If you wish to toggle this, I suggest that you use disable context saving (for both interrupts) and manually save the wanted registers values for the desired interrupt.
Regards,
Filip.
The disablecontextsaving disables context saving for both high and low priority interrupts.
If you wish to toggle this, I suggest that you use disable context saving (for both interrupts) and manually save the wanted registers values for the desired interrupt.
Regards,
Filip.