Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to solve the interrupts with little intermediat period?

Status
Not open for further replies.

Thomson

Full Member level 3
Full Member level 3
Joined
Oct 15, 2004
Messages
181
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,400
how to solve interrupt

Hi,
Currently,when i implemented the ISR strategy of the system, i found that when delt with one sort of interrupt i masked it so that the same interrupt will not overrun the previous one being handled! I re-opened the interrupt after it had been completed, which requires that the hardware shall not overrun the interrupt source when maked,i.e., the interrupt source can generate a normal interrupt request when un-masked although the interrupt source occured during the ISR handling process.

Is this rational?

In fact, in order to realize such mechanis, the hardware interrupt signal is always asseted when the corresponding interrupt source and the mask bit is cleared.

Or if not, how to deal with it?

Thansk in advance!

Thomson
 

Re: How to solve the interrupts with little intermediat peri

What hardware platform is this?
 

Yes, that is normal to use nested interrupts if you can properly estimate number of such nestings occured at same time and duration to handle those.
If you can not - your system may crash.

Dependent on system ISR routine handling overhead must be calculated and properly measured to avoid long ISR handlings . Reporting on semaphores or mutexes in ISR or other system calls can take long time .

Added after 15 minutes:

Let say few cases :
- Limited stack . That what you have to calculate as sum of dipeest functio call in your program plus max stack needed for all possible nested interrupts iven they are triggered in sequence - worst case scenarios.
- 2 same time interrupts occured in nested sequence - 1st interrupt on peripherial A , second on peripherial B and third on peripherial A again . That what you should detect using interrupt nesting variable for one particular type of interrupt (increment it when ISR just arrived but before allowing nested interrupts start to serve ISR and then disable interrupt followed by variable decrement just before ISR leave ) -if that cold serve trouble . This handling allows to be aware of nested same time interrupts .
-.... mmmm add your cases here to model it and find a solutions .

Also try to find quick way to - if possible just to record event and process it later - do it . If you cvan keep that handling time less that duration of shortest nonlatency interrupt time - go ahead . If not - nesting must be allowed .
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top