Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

interrupt latency with the tm_basic module

HI,

I am not able to measure the interrupt latency with the tm_basic module.

First: I run the tm_basic on my NIOS II demo board It gives me all the informations except the interrupt latency it is normal at this point.

Second: I added the 2 options with the ecos config tools CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY & CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)

I also added the definition of HAL_CLOCK_LATENCY() in the hal_intr.h module# ifdef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY # define HAL_CLOCK_LATENCY( _pvalue_ ) HAL_CLOCK_READ( _pvalue_ )# endif

Now when I run the tm_basic, the program stops after the printout of

Reading the hardware clock takes 78 'ticks' overhead

... this value will be factored out of all other measurements

It blocks in the loop :

// Try and measure how long the clock interrupt handling takes

for (i = 0; i < nsamples; i++) {

tick0 = cyg_current_time();

while (true) {

tick1 = cyg_current_time();

if (tick0 != tick1) break;

}

HAL_CLOCK_READ(&tv[i]);

}

The tick1 doesn’t increase

The RealTimeClock::isr runs but the dsr is not working.

Am I wrong in this procedure ?

Thanks for your advice.
No RepliesBe the first to reply