On LPC21xx ( I use LPC2138 with GCC), the timers functions, 4xCAP and 4xMAT share a unique ISR. In my application I use all CAP and MAT functions generating ints. Using Preemptive scheduler is ok, I implemented my ISR as recommended by the documentation:
void timer0_isr_Wrapper( void ) __attribute__ ((naked));
void timer0_isr_Wrapper( void )
timer0_isr(); /* contain tick, CAP and MAT handling */
Now the part I not really understand how to implement. To use the non preemptive scheduler, no call to portSAVE_CONTEXT and portRESTORE_CONTEXT must be done in ISR. At that point, how can I implement the ISR if I need both non preemptive scheduler on MAT (periodic timer) and calls to kernel functions in others part of ISR, thus saving and restoring context.
Demo codes are not helpfull as ISR only handle Tick.
Thank you for any suggestions.