C8051F39x/37x
On exit from the PCA0 interrupt service routine, the CIP-51 will return to the SPI0 ISR. On execution of the
RETI instruction, SFR page 0x00 used to access the PCA0 registers will be automatically popped off of the
SFR page stack, and the contents at the SFRPGIDX = 001b location will be moved to the SFRPAGE reg-
ister. Software in the SPI0 ISR can continue to access SFRs as it did prior to the PCA interrupt. Likewise,
the contents at the SFRPGIDX = 010b location are moved to the SFRPGIDX = 001b location. Recall this
was the SFR Page value 0x0F being used to access TS0CN before the SPI0 interrupt occurred. See
Figure 19.5.
SFRPGIDX[2:0]
1)SFR page 0x00 from PCA0 ISR automatically
popped off on return from interrupt
SFRPAGE = 0x00
000
(SPI0)
0x0F
2)Value at SFRPGIDX = 001b location is
popped to SFRPAGE
001
010
011
100
(TS0CN)
3)Value at SFRPGIDX = 001b location is
popped to SFRPGIDX = 010b location
SFRSTACK
Figure 19.5. SFR Page Stack Upon Return from PCA0 Interrupt
104
Preliminary Rev. 0.71