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++
12745 Discussions

problems with timer interrupts with nios II/f

Altera_Forum
Honored Contributor II
1,485 Views

Dear all, 

I've been using uclinux with an altera project using NIOSII/s cpu. In this project I've used the standard ram, timer, uart, ethernet, etc.. plus a timer called high_res_timer with 1 msec cycle time. I have used a kernel driver (inspired from one taken in a post here) and the user code has always worked well with interrupts. Making cat /proc/interrupts I have always seen the timer running. Now, changing from nios II/s to nios II/f, the interrupts don't arrive anymore. all the other things (uart, ethernet etc..) continuing to work correctly. 

Any idea in the forum?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
639 Views

I see that probably nobody had my problem, so a second question is: 

does anybody has a working uclinux project with niosII/f using a second timer? 

if yes please could you post the kernel driver code (and possibly the user code)? 

many thanks
0 Kudos
Altera_Forum
Honored Contributor II
639 Views

I think I read, the "small" NIOS can't be used ti run Linux. But maybe I'm wrong.  

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
639 Views

no Michael, II/s and II/f are ok with uclinux, and in fact, I have used it for more than one year for various tests. Only when I changed the CPU, in the same project, to II/f, the timer didn't produce interrupts any more. 

Thanks for the response anyway.
0 Kudos
Altera_Forum
Honored Contributor II
639 Views

One potential gotcha when going from NIOS II/s to /f is the addition of the data cache. Make sure that writes to the timer registers (or other hardware) bypass the data cache or you will have problems.

0 Kudos
Altera_Forum
Honored Contributor II
639 Views

whether you have used irq0 for timer or not. if not ,you should change.

0 Kudos
Reply