Hi
I did more precise test.
125 uSec interrupt that posts semaphore to task, whcih in turn posts another semaphore.
CPU time stamp counter is sampled in 2 places. Each time after semaphoreTake.
There is a jitter in delay related to system tick (1 msec), with each hop (semGive/semTake, latency/reaction time grows).
you will find the numbers of the answers on the right when you scroll down the topic. Its’s not done very well in the UI, I agree.
Tracealyzer can assist you in following the timing by threads/isrs, ie on the OS side of things.
You are using third party extension (OSAL_xxx). Do you see the same issue with native API calls, or are you positive that those wrappers do not add any code that may affect the timing? Also, is your TimerTick() function the one that the entry in the ivt points to, or are there some kind of eco system enforced wrappers in between that may affect your timing?
Where does your timer tick handler come into play in that call stack?
As I suspected, your eco system may add additional wrappers around several call chain including isrs which may affect the timing. You may wish to repeat your experiment with barebone FreeRTOS and contact TI if they are responsible for the jitters you see.
this is full timer tick stack trace. A lot of enable/disable interrupts, memory barriers, Interrupt controller clean ups, but nothing that can explain grows in latency of the next semgive/take hop.
That does not make sense at all. In the code you provide, your TimerTick() function does not call into Hwip_irq_handler(), so your code is not complete, or there are some kinds of wrappers in your eco system. Those will very likely be responsible for whatever timing phenomena you see. Try to remove all eco system dependencies and repro the issue with barebone FreeRTOS. If you can not repro it, contact IT. If yes, post your complete code here.
But then your TimerTick function does not come into play at all. What exctly are we discussing then here? Again, try barebone FreeRTOS to eliminate all causes related to your eco system.
TI port provides minumim wrapper for interrupts. Nothing to throw away.
I’m less concerned about my Timer interrupt. Because it works 7 times as expected, by once in a system tick (each 1 mSec) there a disturbance. System tick ISR and things that happens in incrementTick take too long. Maybe TI’s port does not call right function for System Tick notification?
Do you have some time for teams?
well yes. It obviously is an issue on TIs side, possibly some periodic background processing claiming the critical section, or something like that. Have you tried contacting TI support? For once more, I strongly recommend rebuilding the app for barebone FreeRTOS and comparing the results.
Tracealyzer is a valuable tool for tracking these kinds of issues.
Apologies, I do not currently have capacities for P2P support.