Forum Discussion
Altera_Forum
Honored Contributor
14 years agoInterval Timer Problem
Hi, I got a system with an interval timer. Now I want to use it to to count how long the time is between two positiv flanks. But the counter won't start. My code: int count_timeH=0...
Altera_Forum
Honored Contributor
14 years agoFirst of all you write 0 to period registers. This means setting the timer to one clock period, which makes no sense. Did you instantiate a fixed period timer or full featured?
Secondly, the correct procedure for getting actual timer count is writing to one of the snap register: the write data is ignored but the timer will latch the current 32bit value into snapshot registers. Then read the latched value. You always get 0 from the control register because start and stop bits are write only.