ATtiny1624/1626/1627

Interrupt Flags - Buffer Mode

Name:
INTFLAGS
Offset:
0x03
Reset:
0x00
Access:
-
Bit76543210
RXCIFTXCIFDREIFSSIFBUFOVF
AccessR/WR/WR/WR/WR/W
Reset00000

Bit 7 – RXCIF: Receive Complete Interrupt Flag

Receive Complete Interrupt Flag

This flag is set when there are unread data in the Receive Data Buffer register and cleared when the Receive Data Buffer register is empty (that is, it does not contain any unread data).

When interrupt-driven data reception is used, the Receive Complete Interrupt routine must read the received data from the DATA register 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

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

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 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: Client Select Trigger Interrupt Flag

Client Select Trigger Interrupt Flag

This flag indicates that the SPI has been in Host mode, and the SS pin has been pulled low externally, so the SPI is now working in Client mode. The flag will only be set if the Client Select Disable (SSD) bit is not ‘1’. The flag is cleared by writing a ‘1’ to its bit location.

Bit 0 – BUFOVF: Buffer Overflow

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.