Forum Discussion
Altera_Forum
Honored Contributor
13 years agoNIOS II timer problem
Hi, I've got a problem with my program running on DE2 board from altera (Nios II processor) Our task was to construct a model of a washing machine, and allow user to choose the speed of spin. In a...
Altera_Forum
Honored Contributor
13 years agoIf I were you, I'd write your own Avalon slave with a 32bit up-counter that counts at (say) 1kHz). You can then use simple modulo arithmetic for timeouts (up to 40-something days).
A similar counter, counting at sys_clk can easily be used for performance mearurements. IIRC the Altera timer is a 16bit slave that requires multiple accesses to read - so can't be used from program code and ISR unless you disable interrupts. It is also over-complicated for what it is.