I’m trying to use FreeRTOS port on dsPIC33FJ128GP206 and I need to drive a lot of servos. Servos are being driven with OC1-3 channels through multiplexers, OCx are using timer2. FreeRTOS is using timer1, as in example and is running at lowest priority timer interrupt (priority 1), while timer2 is running at priority 7. When tasks are switching it causes a lag or something and servos shake during context switch.
Just to do some research on issue, I’ve replaced timer1 handler with some dummy code, to see if it will occur with same interrup priorities - everything is ok. As soon as I add RTOS functionality - jitter is back.
How can I get rid of this? I think I’ve already tried everything, but the jitter is still present. The more tasks I add, the more jitter there is - shake per task (switch)