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

FreeRtos Interrupt Handling Mechanisim on NiosII

Altera_Forum
Honored Contributor II
1,301 Views

Hi 

 

I`m trying to perform a benchmark to get an idea how much overhead FreeRTOS brings when compared to Altera library,roughly. 

 

For this purpose i have implemented two tests which uses timer interrupts. 

 

Test 1: uses alt_alarm_start to start an alarm timer and toggles a output pin when alt_avalon_timer_sc_irq enters. And timeout_pulse is enabled in fgpda hw desing so I know when interrupt occurs and when its handled. Measuring via scope yields 2.02us 

Test 2: uses xTimerCreate start an timer and toggles a output pin when alt_irq_handler enters. It`s being called from port_asm.S. And timeout_pulse is enabled in fgpda hw desing so I know when interrupt occurs and when its handled. Measuring via scope yields 1.27us 

 

Problem is I would expect that test1 would have significant smaller delta when compared to Test2 due to FreeRTOS overhead but apparently results do indicate opposite. So I thought may be alt_irq_handler is too late to start of measurement.  

 

Do you have any idea where are interrupts first handled when FreeRtos is present ? 

 

Thanks in advance
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
391 Views

Hi again 

Apparently I have a mistake in my code. After I corrected that , I can observe  

test2 =2.10us
0 Kudos
Reply