I haven't posted for a while and things look different from what I remember, so I hope I'm in the right place.
I am trying to use the Time Of Day module with both a one-second and a timer match interrupt.
As both these interrupts use the same interrupt vector, I want to differentiate between them in the interrupt routine.
I thought this would just involve checking which interrupt flag(s) were set and performing the appropriate actions. However, clearing the one-second interrupt flag TODSC_SECIE appears to also clear the match interrupt flag TODSC_MTCHF.
I have interrupts disabled while stepping, but it looks as if the time of day counter may still be running while the micro is halted?
I know I do not need to do things this way, I currently have a 60s count in the one second interrupt, but I'm looking at using the match interrupt to provide a variable delay and keep the micro in Stop3 for longer and only use the one-second interrupt as necessary. For this I want to make sure the two interrupt flags are truely separately clearable.
Code Warrior 6.1