Forum Discussion
Altera_Forum
Honored Contributor
15 years agoWell, after poking around I realized that the code to calibrate the delay is in the file ~/nios2-linux/linux-2.6/init/calibrate.c
The lines causing the hang are the following: if (!printed)
pr_info("Calibrating delay loop... \n");
while ((loops_per_jiffy <<= 1) != 0) {
/* wait for "start of" clock tick */
ticks = jiffies;
while (ticks == jiffies)
/* nothing */;
/* Go .. */
ticks = jiffies;
__delay(loops_per_jiffy);
ticks = jiffies - ticks;
if (ticks)
break;
} This corresponds to line numbers from 144 to 157. The hang occurs at while(ticks == jiffies) because the value of "jiffies" never change. My guess is that my timer component is not ticking. So, what can I do to debug the timer? Or is it really the timer? Thanks in advance Bruno