Interrupt sequence

Interrupt sequence

Post by Anan » Wed, 28 May 2003 22:54:18



Hi

I'm using a 68380 for a board. I use an interrupt pin from an external
chip. Once this chip raises an interrupt, it is acknowledged by the
processor and ISR starts executing. Before this ISR completes
execution, if there is another interrupt on the same pin, will the
processor start handling it immediately (since priority is the same)?

regards
ananth

 
 
 

Interrupt sequence

Post by Gene S. Berkowit » Thu, 29 May 2003 08:36:38



Quote:> Hi

> I'm using a 68380 for a board. I use an interrupt pin from an external
> chip. Once this chip raises an interrupt, it is acknowledged by the
> processor and ISR starts executing. Before this ISR completes
> execution, if there is another interrupt on the same pin, will the
> processor start handling it immediately (since priority is the same)?

> regards
> ananth

No, only an interrupt of a higher priority would be handled.

--Gene

 
 
 

Interrupt sequence

Post by Dave » Thu, 29 May 2003 15:00:03





>>I'm using a 68380 for a board. I use an interrupt pin from an external
>>chip. Once this chip raises an interrupt, it is acknowledged by the
>>processor and ISR starts executing. Before this ISR completes
>>execution, if there is another interrupt on the same pin, will the
>>processor start handling it immediately (since priority is the same)?

> No, only an interrupt of a higher priority would be handled.

Different rules apply to level 7 interrupts.  They cannot be inhibited,
providing essentially a non-maskable interrupt.  A level 7 interrupt
will be recognized even if the interrupt mask is set to 7.

    -=Dave=-

 
 
 

1. What is propper sequence for clearing CISR Register bits

As long as you are talking about the SCCE event entries, you are
right, they should be cleared *BEFORE* they are processed, otherwise
for example new buffers that come up shortly after your buffer
processing loop might not be recognized as soon as possible (their
event bits would be cleared although the buffers were not processed).

The CISR has an other meaning: It simply indicates what interrupt
service functions are "In Service", and, this is its *MAIN* function,
it blocks any other interrupt sources of same or lower priority from
requesting interrupt. So the CISR is the key register to implement
nested interrupts for CP interrupt sources.

As long as a bit is set in the CISR, no lower priorized CPIC IRQ
source can request an interrupt. This means that you can establish the
following structure to your IRQ functions (here for SMC1):

1. examine and store the current IRQ mask value in the status register
of the CPU (I2-I0).

2. Lower the IRQ mask level in the CPU's status register by one (for
example from 4 to 3).
This will allow higher priorized IRQ sources in the CPIC (PC0 for
example) to "interrupt" the processing of the current interrupt
function (nested and priorized CPIC interrupts!). Note that the same
or a lower-priorized IRQ source (PC11 for ex.) in the CPIC cannot
interrupt the processing of the current IRQ function, since these
sources are blocked by the SMC1 bit set in CISR.

3. process your interrupt (this is complicated enough, smile...). This
includes clearing the SMC event register etc...

4. reestablish the original value of the IRQ mask in the SR of the CPU
(to 4 for example)

5. clear the SMC1 bit in the CISR. This will enable requests from
lower priority IRQ sources as well, but they are now blocked because
of the IRQ mask in the SR of the CPU

6. finally return from exeption (RTE).

Huuh, this is quite complicated, but compare it to the NOTE in chapter
7.15.5.4 in the MC68360 UM/AD Rev1.

If you have any more questions, please feel free to contact me again.

 Bye,
        Thomas.

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Elilandstrasse 12
D-81547 Muenchen          Germany

2. Parallel Port Backup Software

3. 68681 programming sequence?

4. Size of NDS trees?

5. 68302 SCC3 Rx interrupt

6. passwd question

7. 68332 interrupt handling

8. Bad Laptop BIOS Flash

9. 6850 UART Chip interrupt handl

10. 68000 interrupts

11. EICN: 68K Interrupt Structure Part 2

12. 68040 Spurious Interrupts

13. Interrupt controller for 680xx?