Forum Discussion
Altera_Forum
Honored Contributor
21 years agoTimer problem (uS)
I need high resolution timer and I've configured timer to use uS resolution at SOPC Builder. When I call function alt_ticks_per_second() it shows 1000000 as expected but still the timer is runni...
Altera_Forum
Honored Contributor
21 years agoHassu,
Almost every design example contains examples of a sys_clk_timer in use. The HAL automatically configures it for a system clock tick of 10ms. This is used, directly, by uC/OS-II, if you are using that RTOS, and, likely, others. For a software example, using a "high_res"/timestamp timer, look no further than the dhrystone software template. You'll find the hardware and software examples in the <nios2_install_dir>/examples directory. Regarding changing the default settings, you can read up on how to do that in the "Altera Embedded Peripherals Handbook" in the documents directory (n2cpu_nii5v3.pdf). If, after browsing through all of that, you still have questions, then please post some more detail of exactly what you're trying to do and how you're trying to do it. (code snippets would help!) Cheers, - slacker