Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

AVALON_TIMER

Altera_Forum
Honored Contributor II
1,367 Views

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.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
336 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
336 Views

Unfortunately this is an additional timer. The system library is set to "system_timer".  

 

 

Any other ideas? Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
336 Views

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
0 Kudos
Reply