Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to identify interrupt within interrupt

Status
Not open for further replies.
Hi,

I have this question suppose i am servicing one interrupt and another same interrupt occurred how do I know it. I mean to say as the question says how to identify interrupt within interrupt is happening.

Thanks in advance,
 
Normally the are queued! The interrupts cannot read the interrupt flags until the interrupt is serviced... Once the interrupt is done, the second flag will be dealt with..

On some micro's there is a priority... Interrupts can be interrupted by a higher level interrupt... Under these conditions careful interrupt software programming is required..

The 8052 series has several interrupts... The mid range pic has only one, the enhanced has two.

Some have a whole host in hardware AND software interrupts...

Which processor are you looking at??
 
I am looking at S12x EQ512 CAN interrupts, wanted to know if one CAN interrupt is being serviced then can it interrupt it again, if i do not disable them.
 
That can't happen anyway!!
The CAN bus cannot receive two messages at the same time.... Are you running two separate CAN networks??

The receive ISR wont be interrupted by a similar ISR call, it will be queued..
 
Yes i receive only message at a time. Probably i should keep my isr very small such that i have to copy only the data from the registers and come out of the ISR. It is possible that several nodes may be connected on a single CAN bus and they can be sending their cyclic messages and keep interrupting my controller. That is the reason i am getting confused.
 
If each interrupt is assigned a diferent isr you activate diffeeent pins going high / low as necessary to know who went off and when.
 
Make sure that you understand what each interrupt means with respect the others. As Ian said, keep into account if your interrupts have a priority assigned. Using the 18F family, seemed confusing but should be (it is) not.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top