
215
XMEGA A [MANUAL]
8077I–AVR–11/2012
Bit 4
– WIEN: Write Interrupt Enable
Setting the write interrupt enable (WIEN) bit enables the write interrupt when the write interrupt flag (WIF) in the STATUS
register is set. In addition the INTLVL bits must be nonzero for TWI master interrupts to be generated.
Bit 3
– ENABLE: Enable TWI Master
Setting the enable TWI master (ENABLE) bit enables the TWI master.
Bit 2:0
– Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to zero
when this register is written.
19.9.2 CTRLB
– Control register B
Bit 7:4
– Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to zero
when this register is written.
Bit 3:2
– TIMEOUT[1:0]: Inactive Bus Timeout
Setting the inactive bus timeout (TIMEOUT) bits to a nonzero value will enable the inactive bus timeout supervisor. If the
bus is inactive for longer than the TIMEOUT setting, the bus state logic will enter the idle state.
Table 19-3. TWI master inactive bus timeout settings.
Bit 1
– QCEN: Quick Command Enable
When quick command is enabled, the corresponding interrupt flag is set immediately after the slave acknowledges the
address (read or write interrupt). At this point, software can issue either a STOP or a repeated START condition.
Bit 0
– SMEN: Smart Mode Enable
Setting this bit enables smart mode. When smart mode is enabled, the acknowledge action, as set by the ACKACT bit in
the CTRLC register, is sent immediately after reading the DATA register.
19.9.3 CTRLC – Control register C
Bit
76543210
+0x01
–
TIMEOUT[1:0]
QCEN
SMEN
Read/Write
RRRR
R/W
Initial Value
00000000
TIMEOUT[1:0]
Group configuration
Description
00
DISABLED
Disabled, normally used for I2C
01
50US
50s, normally used for SMBus at 100kHz
10
100US
100s
11
200US
200s
Bit
76543210
+0x02
–
ACKACT
CMD[1:0]
Read/Write
RRRRR
R/W
Initial Value
00000000