Zilog Z8F0130 Uživatelský manuál Strana 46

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 314
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 45
eZ8
CPU Core
User Manual
UM012820-0810 Interrupts
42
Nesting of Vectored Interrupts
Vectored interrupt nesting allows higher priority requests to interrupt a
lower priority request. To initiate vectored interrupt nesting, follow the
steps below, during the interrupt service routine:
1. Push the old Interrupt Control and Interrupt Enable Register
information about the stack.
2. Load the Interrupt Enable Register information with new masks to
disable lower priority interrupts.
3. Execute an EI instruction to enable the interrupts.
4. Proceed with the interrupt service routine processing.
5. After processing is complete, execute a DI instruction to disable the
interrupts.
6. Restore the Interrupt Control and Interrupt Enable Register
information from the stack.
7. Execute an IRET instruction to return from the interrupt service
routine.
Polled Interrupt Processing
Polled interrupt processing is supported by individually disabling the
interrupts to be polled. To initiate polled processing, check the interrupt
bits of interest in the Interrupt Request Register(s) using the Test Under
Mask (TM) or similar bit test instruction. If the bit is 1, perform a
software call or branch to the interrupt service routine. Write the service
routine to service the request, reset the Interrupt Request bit in the
Interrupt Request Register, and return or branch back to the main
program. An example of a polling routine follows:
TM IRQ1, #0010000b; Test for
interrupt request in bit 5 of IRQ1
Zobrazit stránku 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 313 314

Komentáře k této Příručce

Žádné komentáře