Forum Discussion
Altera_Forum
Honored Contributor
21 years agoAVALON_TIMER
Hi all,
I am trying to use a timer in my design. As soon as I try to enable it, I no longer recieve debugging output on the NIOS II console. I have attached the piece of code causing the problem. Whe I uncomment " fft_timer_control |= ALTERA_AVALON_TIMER_CONTROL_ITO_MSK;" I will not recieve output until resetting the processor and reprogramming. (Stratix device on the DSP development board) Code Snippet: // Start the FFT clock fft_timer_control = IORD_ALTERA_AVALON_TIMER_CONTROL(FFT_TIMER_BASE); fft_timer_control |= ALTERA_AVALON_TIMER_CONTROL_START_MSK; // fft_timer_control |= ALTERA_AVALON_TIMER_CONTROL_ITO_MSK; fft_timer_control |= ALTERA_AVALON_TIMER_CONTROL_CONT_MSK; IOWR_ALTERA_AVALON_TIMER_CONTROL(FFT_TIMER_BASE,fft_timer_control); Any ideas? Thanks in advance.3 Replies
- Altera_Forum
Honored Contributor
I have some ideas but am not an expert in this area.
I know that the HAL uses the interrupts from the system timer to transfer output to the host. You might be interfering with its operation. You could try setting the system timer to "none" in the associated system library page of Nios II IDE or you could add another timer and not try to share one. - Altera_Forum
Honored Contributor
Unfortunately this is an additional timer. The system library is set to "system_timer".
Any other ideas? Thanks! - Altera_Forum
Honored Contributor
You may wish to take a look at the TCM example in Nios II 5.0 (template in the IDE). That example makes use of a timer and perhaps will point out something that you may have missed.
Goodluck