1 Reply Latest reply on Sep 17, 2018 2:55 AM by bob.marlowe

    In PSoC4100s, how to ensure the accuracy of the timer2

    qipanli_3374261

      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.