Page 1 of 1

Timer alarm triggers at wrong value

Posted: Thu Nov 28, 2019 8:49 pm
by apurva
Hello! I am using one of the hardware timers and want the alarm to ring after 15mins. I have enabled autoreload and the timer counts up from 0. However, after just 40 seconds, the alarm is triggered and the counter value is reset back to 0. I am not able to figure out why the alarm triggers after 40s when it should only trigger after 900s. I have followed the example code and I have checked multiple times to make sure it is correct. Any help would be appreciated.

Re: Timer alarm triggers at wrong value

Posted: Fri Nov 29, 2019 2:54 pm
by mikemoy
Why haven't you posted your code. How can we help if no one here has a clue what you have done, or what example you are trying to use.

Re: Timer alarm triggers at wrong value

Posted: Sat Nov 30, 2019 8:06 am
by WiFive
Because you are not forcing a 64-bit value. 900sec (ticks) truncated to 32-bits is 41sec.