Forum Discussion
Altera_Forum
Honored Contributor
14 years agoUsing 2 timers ?
We are trying to use 2 interval timer (200ms and 500ms) on a nios 2 processor. One is configure as a system clock timer and its work fine., but the second don’t ...
Altera_Forum
Honored Contributor
14 years agoI do use 2 timers in the same way you do. I even used 3 in a project.
So, there's definitely no problem with the timer itself. It MUST work. Please, perform a few more tests before giving up. - register the irq before starting the timer - remove alt_irq_enable; this is not required - disable and reset the timer first of all, before programming period: IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER_250M_IRQ, 0) - try without enabling irq and make sure the timer runs; in other words, remove alt_irq_register() and read snap registers as you already do Remark: writing both snap registers is not necessary; writing just one of them is enough to latch both.