Forum Discussion
Altera_Forum
Honored Contributor
16 years agoproblems with timer interrupts with nios II/f
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?5 Replies
- Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
I think I read, the "small" NIOS can't be used ti run Linux. But maybe I'm wrong.
-Michael - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
whether you have used irq0 for timer or not. if not ,you should change.