Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12369 Discussions

interrupt latency with the tm_basic module

Honored Contributor I



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; 


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.
0 Kudos
0 Replies