2014-11-04 04:46 AM
1. I have STM32F205 running at 120Mhz with external 16Mhz crystal.
Prefetch , Data & Instruction buffer on. timer is clocked by 60Mhz2. task is to toggle 10 pins with a base count of 100us.i.e User will enter number in multiple of 100us & I have to toggle the pins.3. I have timer base of 100us & accordingly I am toggled the pins. In interrupt only 10 variables are incremented. So ISR is very small.4. System works fine initially but on long run (1 hour or so), I saw some latency keep on adding. 5. This probably due to small time base i.e 100us. It adds jitter & theoretically Cortex-M3 core should always be able to service an interrupt request within 15 cycles . Is it due to these cycles which accumulate over period of time & generate error.6. Any possible solution/advise/technical point2014-11-04 05:51 AM
Well it's certainly possible to set a timer with a continuous timebase that remains synchronous regardless of what the interrupt is doing.
It's not clear what you're measuring, and the timer is capable of toggling pins directly, and you could measure latency with respect to that. If you compare two independent clock sources, you're always going to observe an accumulating bias, as each drift with respect to each other.