25.5.5 Interrupt Flags - Buffer Mode
Name: | INTFLAGS |
Offset: | 0x03 |
Reset: | 0x00 |
Property: | - |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
RXCIF | TXCIF | DREIF | SSIF | BUFOVF | |||||
Access | R/W | R/W | R/W | R/W | R/W | ||||
Reset | 0 | 0 | 0 | 0 | 0 |
Bit 7 – RXCIF Receive Complete Interrupt Flag
When interrupt-driven data reception is used, the Receive
Complete Interrupt routine must read the received data from the DATA register in
order to clear RXCIF. If not, a new interrupt will occur directly after the
return from the current interrupt. This flag can also be cleared by writing a
‘1
’ to its bit location.
Bit 6 – TXCIF Transfer Complete Interrupt Flag
This flag is set when all the data in the Transmit shift register
has been shifted out, and there is no new data in the transmit buffer
(SPIn.DATA). The flag is cleared by writing a ‘1
’ to its bit
location.
Bit 5 – DREIF Data Register Empty Interrupt Flag
This flag indicates whether the Transmit Data Buffer register is
ready to receive new data. The flag is ‘1
’ when the transmit
buffer is empty and ‘0
’ when the transmit buffer contains data
to be transmitted that has not yet been moved into the shift register. The DREIF
is cleared after a Reset to indicate that the transmitter is ready.
The DREIF is cleared by writing to DATA. When interrupt-driven data transmission is used, the Data Register Empty Interrupt routine must either write new data to DATA in order to clear DREIF or disable the Data Register Empty interrupt. If not, a new interrupt will occur directly after the return from the current interrupt.
Bit 4 – SSIF Slave Select Trigger Interrupt Flag
This flag indicates that the SPI has been in Master mode and the
SS pin has been pulled low externally, so the SPI
is now working in Slave mode. The flag will only be set if the Slave Select
Disable (SSD) bit is not ‘1
’. The flag is cleared by writing a
‘1
’ to its bit location.
Bit 0 – BUFOVF Buffer Overflow
This flag indicates data loss due to a Receive Data Buffer full
condition. This flag is set if a Buffer Overflow condition is detected. A Buffer
Overflow occurs when the receive buffer is full (two bytes), and a third byte
has been received in the shift register. If there is no transmit data, the
Buffer Overflow will not be set before the start of a new serial transfer. This
flag is cleared when the DATA register is read, or by writing a
‘1
’ to its bit location.