English
Language : 

CC2510FX Datasheet, PDF (63/244 Pages) List of Unclassifed Manufacturers – True System-on-Chip with Low Power RF Transceiver and 8051 MCU
handle one interrupt source each time the
interrupt is triggered, hence clearing only one
module flag. When any module flag is cleared
the chip will check if there are any module
interrupt flags left that are both enabled and
C2510Fx / CC2511Fx
asserted, if so the CPU interrupt flag will be
asserted and a new interrupt triggered.
The following code example shows how only
one module flag is handled and cleared each
time the interrupt occurs:
#pragma vector = RF_VECTOR
__interrupt void rf_interrupt (void)
{
S1CON &= ~0x03;
// Clear CPU interrupt flag
if(RFIF & 0x80)
// TX underflow
{
irq_txunf();
// Handle TX underflow
RFIF = ~0x80;
// Clear module interrupt flag
}
else if(RFIF & 0x40) // RX overflow
{
irq_rxovf();
// Handle RX overflow
RFIF = ~0x40;
// Clear module interrupt flag
}
// Use ”else if” to check and handle other RFIF flags
}
TCON (0x88) – CPU Interrupt Flag 1
Bit Name
7 URX1IF /
I2SRXIF
6
Reset R/W
0
R/W
H0
0
R/W
Description
USART1 RX interrupt flag / I2S RX interrupt flag
Set to 1 when USART1 RX interrupt occurs and cleared when CPU vectors
to the interrupt service routine.
0 Interrupt not pending
1 Interrupt pending
Not used
5 ADCIF
4
0
R/W ADC interrupt flag. Set to 1 when ADC interrupt occurs and cleared when
CPU vectors to the interrupt service routine.
H0
0 Interrupt not pending
1 Interrupt pending
0
R/W Not used
3 URX0IF
2
0
R/W USART0 RX interrupt flag. Set to 1 when USART0 interrupt occurs and
cleared when CPU vectors to the interrupt service routine.
H0
0 Interrupt not pending
1 Interrupt pending
1
R/W Reserved. Must always be set to 1.
1 RFTXRXIF 0
0
1
R/W RF TX/RX complete interrupt flag. Set to 1 when RFTXRX interrupt occurs
and cleared when CPU vectors to the interrupt service routine.
H0
0 Interrupt not pending
1 Interrupt pending
R/W Reserved. Must always be set to 1.
SWRS055D
Page 63 of 243