Cypress Semiconductor FX2LP Información técnica Pagina 101

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 100
Chapter 4. Interrupts Page 4-11
If Autovectoring is enabled, the INT2VEC byte replaces the contents of address 0x0045 in the
FX2’s program memory. This causes the FX2 to automatically vector to a different address for
each USB interrupt source. This mechanism is explained in detail in Section 4.5.
"USB-Interrupt
Autovectors."
Due to the OR gate in Figure 4-1, assertion of any of the individual USB interrupt sources sets the
FX2’s “main” USB Interrupt request bit (EXIF.4). This main USB interrupt is enabled by setting
EIE.0 to 1.
To clear the main USB interrupt request, firmware clears the EXIF.4 bit to 0.
After servicing a USB interrupt, FX2 firmware clears the individual USB source’s IRQ bit by setting
it to 1. If any other USB interrupts are pending, the act of clearing the IRQ bit causes the FX2 to
generate another pulse for the highest-priority pending interrupt. If more than one is pending, each
is serviced in the priority order shown in Figur e4-1, starting with SUDAV (priority 00) as the high-
est priority, and ending with EP8ISOERR (priority 31) as the lowest.
The main USB interrupt request is cleared by
clearing
the EXIF.4 bit
to 0
; each individual USB
interrupt is cleared by
setting
its IRQ bit
to 1
.
Important
It is important in any USB Interrupt Service Routine (ISR) to clear the main USB Interrupt
before clearing the individual USB interrupt request latch. This is because as soon as the
individual USB interrupt is cleared, any pending USB interrupt will immediately try to gener-
ate another main USB Interrupt. If the main USB IRQ bit has not been previously cleared, the
pending interrupt will be lost.
Vista de pagina 100
1 2 ... 96 97 98 99 100 101 102 103 104 105 106 ... 459 460

Comentarios a estos manuales

Sin comentarios