English
Language : 

C8051F321-GMR Datasheet, PDF (89/250 Pages) Silicon Laboratories – Full Speed USB, 16 k ISP FLASH MCU Family
C8051F320/1
9.3.4. Interrupt Latency
Interrupt response time depends on the state of the CPU when the interrupt occurs. Pending interrupts are
sampled and priority decoded each system clock cycle. Therefore, the fastest possible response time is 5
system clock cycles: 1 clock cycle to detect the interrupt and 4 clock cycles to complete the LCALL to the
ISR. If an interrupt is pending when a RETI is executed, a single instruction is executed before an LCALL
is made to service the pending interrupt. Therefore, the maximum response time for an interrupt (when no
other interrupt is currently being serviced or the new interrupt is of greater priority) occurs when the CPU is
performing an RETI instruction followed by a DIV as the next instruction. In this case, the response time is
18 system clock cycles: 1 clock cycle to detect the interrupt, 5 clock cycles to execute the RETI, 8 clock
cycles to complete the DIV instruction and 4 clock cycles to execute the LCALL to the ISR. If the CPU is
executing an ISR for an interrupt with equal or higher priority, the new interrupt will not be serviced until the
current ISR completes, including the RETI and following instruction.
Note that the CPU is stalled during Flash write/erase operations and USB FIFO MOVX accesses (see Sec-
tion “12.2. Accessing USB FIFO Space” on page 114). Interrupt service latency will be increased for inter-
rupts occuring while the CPU is stalled. The latency for these situations will be determined by the standard
interrupt service procedure (as described above) and the amount of time the CPU is stalled.
Table 9.4. Interrupt Summary
Interrupt Source
Interrupt
Vector
Priority
Order
Pending Flag
Enable
Flag
Priority
Control
Reset
External Interrupt 0
(/INT0)
Timer 0 Overflow
External Interrupt 1
(/INT1)
Timer 1 Overflow
UART0
Timer 2 Overflow
SPI0
SMB0
USB0
ADC0 Window
Compare
0x0000
0x0003
0x000B
0x0013
0x001B
0x0023
0x002B
0x0033
0x003B
0x0043
0x004B
Top None
N/A
N/A
Always
Enabled
Always
Highest
0 IE0 (TCON.1)
Y
Y
EX0 (IE.0)
PX0
(IP.0)
1 TF0 (TCON.5)
Y Y ET0 (IE.1) PT0 (IP.1)
2 IE1 (TCON.3)
Y
Y
EX1 (IE.2)
PX1
(IP.2)
3 TF1 (TCON.7)
Y Y ET1 (IE.3) PT1 (IP.3)
4
RI0 (SCON0.0)
TI0 (SCON0.1)
Y
N
ES0 (IE.4)
PS0
(IP.4)
5
TF2H (TMR2CN.7)
TF2L (TMR2CN.6)
Y N ET2 (IE.5) PT2 (IP.5)
SPIF (SPI0CN.7)
6
WCOL (SPI0CN.6)
MODF (SPI0CN.5)
RXOVRN
Y
N
ESPI0
(IE.6)
PSPI0
(IP.6)
(SPI0CN.4)
7 SI (SMB0CN.0)
Y
N
ESMB0
(EIE1.0)
PSMB0
(EIP1.0)
8 Special
N
N
EUSB0
(EIE1.1)
PUSB0
(EIP1.1)
9
AD0WINT
(ADC0CN.3)
Y
N
EWADC0
(EIE1.2)
PWADC0
(EIP1.2)
Rev. 1.4
89