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
22.214.171.124 in the MC68360 UM/AD Rev1.
If you have any more questions, please feel free to contact me again.
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?