AnsweredAssumed Answered

How to read CVAL of RTC in MPC5606B? how to calculate time betn 2 ext. interrupts?

Question asked by Akshay Daga on Jun 4, 2016
Latest reply on Jun 6, 2016 by Akshay Daga


Board: TRK-MPC5606B

Processor: MPC5606B

I have initialised the RTC.  I have two external interrupts.

In first interrupts, I am loading the full 0xFFFFFFFF value to the LDVAL and  started the timer. (It is down timer)

In second interrupt, I am reading the Current value of the timer using CVAL register. and clearing to TIF bit &  disabling the timer. So as to calculate the time between two interrupts. (I have taken care that time between two interrupt is less than 60 seconds so that timer is not getting reloaded again and again)


But, It is not giving me expected result.


Can anyone help me through this or suggest any other method to calculate the time between two interrupts?