Hi cypress techs
I am using PSoC4100s MCU, in PSoC IDE the created code RTC.c the alarm percision is the second level, my project need alarm percision in the millsecond level.
In my project, timer2's source clock is from WCO which is 32K, so i let the timer2 produce a interrupt in about 1ms period, by record the number of the interrrupts to know the millsecond of system.
Now i have a question that if system have other interrupts such as other timer's interrupt or other high priority interrupt which takes more time in cpu-process, the timer2's interrupt will not being processed in time, at last result in the millsecond not as accurate as i expected, so what's your suggestion for ensure the percision and accurate of timer2's millsecond in whatever conditions?
a) can just use timer2 to get the millsecond level of time in whatever conditions?
b) any other methods to get the millsecond level of time in whatever conditions?
thanks a lot.
You have the choice to use the highest interrupt priority (zero) for the WCO interrupt. When all other interrupts use a lower priority the WCO handler will run as expected.