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++
Announcements
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.
12419 Discussions

Nios II automatic ISR pre-emption

Thierry29
Beginner
210 Views

The Nios II Software Developer Handbook indicates in chapter "9. Exception Handling", section "9.2.3.3. Managing Pre-Emption", that "Automatic pre-emption is only available if you enable it in the BSP settings".

I did not find how to do this in the BSP editor. Does someone could indicate me where this option is in the BSP editor (or how to enable it in another way)? Many thanks in advance.

0 Kudos
2 Replies
BoonBengT_Intel
Moderator
200 Views

Hi @Thierry29,

 

Thank you for posting in Intel community forum and hope all is well.
Per my understanding it will be auto enable when drivers supports it, hence is there any custom driver in your case?


If yes, this post here might give you some insight on enabling it.
Else check if drivers in design are updated with enhanced interrupt API.
Hope that clarify.

 

Best Wishes
BB

Thierry29
Beginner
175 Views

Hi, thank you for your reply.

I do not use custom drivers in my project, only devices from the standard library (mainly pio and timer). I have verified that each of them declare both "isr_preemption_supported" property TRUE and "supported_interrupt_apis" property "enhanced_interrupt_api". If I correctly understand the documentation, the ISR preemption should be automatically enabled. Incidentally if it is true I do not understand why the documentation, section "9.2.3.3. Managing Pre-Emption", indicates that "Automatic pre-emption is only available if you enable it in the BSP settings". Does it mean an action in BSP settings is necessary?

In order to verify if isr preemption is enabled I have launched a simple program:
- a periodic interruption is generated thanks to the HAL facility (alt_alarm_start()) with priority 0 and makes leds blinking each second.
- another interruption source is a push-button, with priority 1 (lower than the periodic one).
The push-button ISR is only an infinite loop: if isr preemption is enabled the leds must continue to blink even if the push-button is pressed because the periodic isr has higher priority.

I my case the leds stop to blink after the push-button is pressed. The infinite loop in the push-button isr deadlocks the system: an isr with low priority masks another one with a higher priority.

So, my problem is to understand why isr preemption is not automatically enabled, or how to enable it.

Thank you for your suggestions and help.

Best regards

Reply