I intend to migarte a single thread application to FreeRTOS, but I encounter a problem that seems to be a limitation of timer resolution introduced by FreeRTOS.
I have a task that starts TA0 and then ISR for TA0 toggles CCR2 at 125000Hz, i.e. every 8 microseconds. The interrupts sometimes are missed. After slow down to 31250Hz, i.e. every 32 microseconds, the toggling of CCR2 seems work correctly.
However, the bigger concern would be, what is the safe threshold? now, 31250Hz works fine with nothing else running, how to make sure this threashold won’t break as more tasks are added?