TWIS — I2C compatible two-wire interface slave with EasyDMA

TWI slave with EasyDMA (TWIS) is compatible with I2C operating at 100 kHz and 400 kHz. The TWI transmitter and receiver implement EasyDMA.

Figure 1. TWI slave with EasyDMA
TWI slave with EasyDMA

A typical TWI setup consists of one master and one or more slaves. For an example, see the following figure. TWIS is only able to operate with a single master on the TWI bus.

Figure 2. A typical TWI setup comprising one master and three slaves
A typical TWI setup comprising one master and three slaves

The following figure shows the TWI slave state machine.

Figure 3. TWI slave state machine
TWI slave state machine

The following table contains descriptions of the symbols used in the state machine.

Table 1. TWI slave state machine symbols
SymbolTypeDescription
ENABLERegisterThe TWI slave has been enabled via the ENABLE register.
PREPARETXTaskThe TASKS_PREPARETX task has been triggered.
STOPTaskThe TASKS_STOP task has been triggered.
PREPARERXTaskThe TASKS_PREPARERX task has been triggered.
STOPPEDEventThe EVENTS_STOPPED event was generated.
RXSTARTEDEventThe EVENTS_RXSTARTED event was generated.
TXSTARTEDEventThe EVENTS_TXSTARTED event was generated.
TX preparedInternalInternal flag indicating that a TASKS_PREPARETX task has been triggered. This flag is not visible to the user.
RX preparedInternalInternal flag indicating that a TASKS_PREPARERX task has been triggered. This flag is not visible to the user.
Unprepare TXInternalClears the internal 'TX prepared' flag until next TASKS_PREPARETX task.
Unprepare RXInternalClears the internal 'RX prepared' flag until next TASKS_PREPARERX task.
Stop conditionTWI protocolA TWI stop condition was detected.
Restart conditionTWI protocolA TWI restart condition was detected.

The TWI slave can perform clock stretching, with the premise that the master is able to support it.

The TWI slave operates in a low power mode while waiting for a TWI master to initiate a transfer. As long as the TWI slave is not addressed, it will remain in this low power mode.

To secure correct behavior of the TWI slave, PSEL.SCL, PSEL.SDA, CONFIG, and the ADDRESS[n] registers must be configured prior to enabling the TWI slave through the ENABLE register. Similarly, changing these settings must be performed while the TWI slave is disabled. Failing to do so may result in unpredictable behavior.

EasyDMA

The TWIS implements EasyDMA for accessing RAM without CPU involvement.

The following table shows the Easy DMA channels that the TWIS peripheral implements.
Table 2. TWIS EasyDMA Channels
ChannelTypeRegister Cluster
TXDREADERTXD
RXDWRITERRXD

For detailed information regarding the use of EasyDMA, see EasyDMA.

The STOPPED event indicates that EasyDMA has finished accessing the buffer in RAM.

TWI slave responding to a read command

Before the TWI slave can respond to a read command, the TWI slave must be configured correctly and enabled via the ENABLE register. When enabled, the TWI slave will be in its IDLE state. .

A read command is started when the TWI master generates a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 1 (WRITE=0, READ=1). The READ/WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) response from the TWI slave.

The TWI slave is able to listen for up to two addresses at the same time. This is configured in the ADDRESS registers and the CONFIG register.

The TWI slave will only acknowledge (ACK) the read command if the address presented by the master matches one of the addresses the slave is configured to listen for. The TWI slave will generate a READ event when it acknowledges the read command.

The TWI slave is only able to detect a read command from the IDLE state.

The TWI slave will set an internal 'TX prepared' flag when the PREPARETX task is triggered.

When the read command is received, the TWI slave will enter the TX state if the internal 'TX prepared' flag is set.

If the internal 'TX prepared' flag is not set when the read command is received, the TWI slave will stretch the master's clock until the PREPARETX task is triggered and the internal 'TX prepared' flag is set.

The TWI slave will generate the TXSTARTED event and clear the 'TX prepared' flag ('unprepare TX') when it enters the TX state. In this state the TWI slave will send the data bytes found in the transmit buffer to the master using the master's clock.

The TWI slave will go back to the IDLE state if the TWI slave receives a restart command when it is in the TX state.

The TWI slave is stopped when it receives the stop condition from the TWI master. A STOPPED event will be generated when the transaction has stopped. The TWI slave will clear the 'TX prepared' flag ('unprepare TX') and go back to the IDLE state when it has stopped.

The transmit buffer is located in RAM at the address specified in the TXD.PTR register. The TWI slave will only be able to send TXD.MAXCNT bytes from the transmit buffer for each transaction. If the TWI master forces the slave to send more than TXD.MAXCNT bytes, the slave will send the byte specified in the ORC register to the master instead. If this happens, an ERROR event will be generated.

The EasyDMA configuration registers, see TXD.PTR etc., are latched when the TXSTARTED event is generated.

The TWI slave can be forced to stop by triggering the STOP task. A STOPPED event will be generated when the TWI slave has stopped. The TWI slave will clear the 'TX prepared' flag and go back to the IDLE state when it has stopped, see also Terminating an ongoing TWI transaction.

Each byte sent from the slave will be followed by an ACK/NACK bit sent from the master. The TWI master will generate a NACK following the last byte that it wants to receive to tell the slave to release the bus so that the TWI master can generate the stop condition. The TXD.AMOUNT register can be queried after a transaction to see how many bytes were sent.

A typical TWI slave read command response is shown in the following figure. Occurrence 2 in the figure illustrates clock stretching performed by the TWI slave following a SUSPEND task.

Figure 4. The TWI slave responding to a read command
The TWI slave responding to a read command

TWI slave responding to a write command

Before the TWI slave can respond to a write command, the TWI slave must be configured correctly and enabled via the ENABLE register. When enabled, the TWI slave will be in its IDLE state.

A write command is started when the TWI master generates a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 0 (WRITE=0, READ=1). The READ/WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) response from the slave.

The TWI slave is able to listen for up to two addresses at the same time. This is configured in the ADDRESS registers and the CONFIG register.

The TWI slave will only acknowledge (ACK) the write command if the address presented by the master matches one of the addresses the slave is configured to listen for. The TWI slave will generate a WRITE event if it acknowledges the write command.

The TWI slave is only able to detect a write command from the IDLE state.

The TWI slave will set an internal 'RX prepared' flag when the PREPARERX task is triggered.

When the write command is received, the TWI slave will enter the RX state if the internal 'RX prepared' flag is set.

If the internal 'RX prepared' flag is not set when the write command is received, the TWI slave will stretch the master's clock until the PREPARERX task is triggered and the internal 'RX prepared' flag is set.

The TWI slave will generate the RXSTARTED event and clear the internal 'RX prepared' flag ('unprepare RX') when it enters the RX state. In this state, the TWI slave will be able to receive the bytes sent by the TWI master.

The TWI slave will go back to the IDLE state if the TWI slave receives a restart command when it is in the RX state.

The TWI slave is stopped when it receives the stop condition from the TWI master. A STOPPED event will be generated when the transaction has stopped. The TWI slave will clear the internal 'RX prepared' flag ('unprepare RX') and go back to the IDLE state when it has stopped.

The receive buffer is located in RAM at the address specified in the RXD.PTR register. The TWI slave will only be able to receive as many bytes as specified in the RXD.MAXCNT register. If the TWI master tries to send more bytes to the slave than it can receive, the extra bytes are discarded and NACKed by the slave. If this happens, an ERROR event will be generated.

The EasyDMA configuration registers, see RXD.PTR etc., are latched when the RXSTARTED event is generated.

The TWI slave can be forced to stop by triggering the STOP task. A STOPPED event will be generated when the TWI slave has stopped. The TWI slave will clear the internal 'RX prepared' flag and go back to the IDLE state when it has stopped, see also Terminating an ongoing TWI transaction.

The TWI slave will generate an ACK after every byte received from the master. The RXD.AMOUNT register can be queried after a transaction to see how many bytes were received.

A typical TWI slave write command response is show in the following figure. Occurrence 2 in the figure illustrates clock stretching performed by the TWI slave following a SUSPEND task.

Figure 5. The TWI slave responding to a write command
The TWI slave responding to a write command

Master repeated start sequence

An example of a repeated start sequence is one in which the TWI master writes two bytes to the slave followed by reading four bytes from the slave.

This is illustrated in the following figure.

In this example, the receiver does not know what the master wants to read in advance. This information is in the first two received bytes of the write in the repeated start sequence. To guarantee that the CPU is able to process the received data before the TWI slave starts to reply to the read command, the SUSPEND task is triggered via a shortcut from the READ event generated when the read command is received. When the CPU has processed the incoming data and prepared the correct data response, the CPU will resume the transaction by triggering the RESUME task.

Figure 6. Repeated start sequence
Repeated start sequence

Terminating an ongoing TWI transaction

In some situations, e.g. if the external TWI master is not responding correctly, it may be required to terminate an ongoing transaction.

This can be achieved by triggering the STOP task. In this situation, a STOPPED event will be generated when the TWI has stopped independent of whether or not a STOP condition has been generated on the TWI bus. The TWI slave will release the bus when it has stopped and go back to its IDLE state.

Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOP task may not be always needed (the peripheral might already be stopped), but if it is sent, software shall wait until the STOPPED event was received as a response before disabling the peripheral through the ENABLE register.

Slave mode pin configuration

The SCL and SDA signals associated with the TWI slave are mapped to physical pins according to the configuration specified in the PSEL.SCL and PSEL.SDA registers respectively.

The PSEL.SCL and PSEL.SDA registers and their configurations are only used as long as the TWI slave is enabled, and retained only as long as the device is in ON mode. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register. PSEL.SCL and PSEL.SDA must only be configured when the TWI slave is disabled.

To secure correct signal levels on the pins used by the TWI slave when the system is in OFF mode, and when the TWI slave is disabled, these pins must be configured in the GPIO peripheral as described in the following table.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 3. GPIO configuration before enabling peripheral
TWI slave signalTWI slave pinDirectionOutput valueDrive strength
SCLAs specified in PSEL.SCLInputNot applicableS0D1
SDAAs specified in PSEL.SDAInputNot applicableS0D1

Registers

Instances

InstanceBase addressDescription
TWIS00x40003000Two-wire interface slave 0
TWIS10x40004000Two-wire interface slave 1

Register overview

RegisterOffsetDescription
TASKS_STOP0x014Stop TWI transaction
TASKS_SUSPEND0x01CSuspend TWI transaction
TASKS_RESUME0x020Resume TWI transaction
TASKS_PREPARERX0x030Prepare the TWI slave to respond to a write command
TASKS_PREPARETX0x034Prepare the TWI slave to respond to a read command
EVENTS_STOPPED0x104TWI stopped
EVENTS_ERROR0x124TWI error
EVENTS_RXSTARTED0x14CReceive sequence started
EVENTS_TXSTARTED0x150Transmit sequence started
EVENTS_WRITE0x164Write command received
EVENTS_READ0x168Read command received
SHORTS0x200Shortcuts between local events and tasks
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x4D0Error source
MATCH0x4D4Status register indicating which address had a match
ENABLE0x500Enable TWIS
PSEL.SCL0x508Pin select for SCL signal
PSEL.SDA0x50CPin select for SDA signal
RXD.PTR0x534RXD Data pointer
RXD.MAXCNT0x538Maximum number of bytes in RXD buffer
RXD.AMOUNT0x53CNumber of bytes transferred in the last RXD transaction
RXD.LIST0x540EasyDMA list type
TXD.PTR0x544TXD Data pointer
TXD.MAXCNT0x548Maximum number of bytes in TXD buffer
TXD.AMOUNT0x54CNumber of bytes transferred in the last TXD transaction
TXD.LIST0x550EasyDMA list type
ADDRESS[0]0x588TWI slave address 0
ADDRESS[1]0x58CTWI slave address 1
CONFIG0x594Configuration register for the address match mechanism
ORC0x5C0Over-read character. Character sent out in case of an over-read of the transmit buffer.

TASKS_STOP

Address offset: 0x014

Stop TWI transaction

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_STOPStop TWI transaction
Trigger1Trigger task

TASKS_SUSPEND

Address offset: 0x01C

Suspend TWI transaction

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_SUSPENDSuspend TWI transaction
Trigger1Trigger task

TASKS_RESUME

Address offset: 0x020

Resume TWI transaction

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_RESUMEResume TWI transaction
Trigger1Trigger task

TASKS_PREPARERX

Address offset: 0x030

Prepare the TWI slave to respond to a write command

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_PREPARERXPrepare the TWI slave to respond to a write command
Trigger1Trigger task

TASKS_PREPARETX

Address offset: 0x034

Prepare the TWI slave to respond to a read command

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_PREPARETXPrepare the TWI slave to respond to a read command
Trigger1Trigger task

EVENTS_STOPPED

Address offset: 0x104

TWI stopped

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_STOPPEDTWI stopped
NotGenerated0Event not generated
Generated1Event generated

EVENTS_ERROR

Address offset: 0x124

TWI error

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_ERRORTWI error
NotGenerated0Event not generated
Generated1Event generated

EVENTS_RXSTARTED

Address offset: 0x14C

Receive sequence started

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_RXSTARTEDReceive sequence started
NotGenerated0Event not generated
Generated1Event generated

EVENTS_TXSTARTED

Address offset: 0x150

Transmit sequence started

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_TXSTARTEDTransmit sequence started
NotGenerated0Event not generated
Generated1Event generated

EVENTS_WRITE

Address offset: 0x164

Write command received

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_WRITEWrite command received
NotGenerated0Event not generated
Generated1Event generated

EVENTS_READ

Address offset: 0x168

Read command received

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_READRead command received
NotGenerated0Event not generated
Generated1Event generated

SHORTS

Address offset: 0x200

Shortcuts between local events and tasks

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWWRITE_SUSPENDShortcut between event WRITE and task SUSPEND
Disabled0Disable shortcut
Enabled1Enable shortcut
BRWREAD_SUSPENDShortcut between event READ and task SUSPEND
Disabled0Disable shortcut
Enabled1Enable shortcut

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSTOPPEDEnable or disable interrupt for event STOPPED
Disabled0Disable
Enabled1Enable
BRWERROREnable or disable interrupt for event ERROR
Disabled0Disable
Enabled1Enable
ERWRXSTARTEDEnable or disable interrupt for event RXSTARTED
Disabled0Disable
Enabled1Enable
FRWTXSTARTEDEnable or disable interrupt for event TXSTARTED
Disabled0Disable
Enabled1Enable
GRWWRITEEnable or disable interrupt for event WRITE
Disabled0Disable
Enabled1Enable
HRWREADEnable or disable interrupt for event READ
Disabled0Disable
Enabled1Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSTOPPEDWrite '1' to enable interrupt for event STOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWERRORWrite '1' to enable interrupt for event ERROR
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWRXSTARTEDWrite '1' to enable interrupt for event RXSTARTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWTXSTARTEDWrite '1' to enable interrupt for event TXSTARTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWWRITEWrite '1' to enable interrupt for event WRITE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREADWrite '1' to enable interrupt for event READ
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSTOPPEDWrite '1' to disable interrupt for event STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWERRORWrite '1' to disable interrupt for event ERROR
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWRXSTARTEDWrite '1' to disable interrupt for event RXSTARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWTXSTARTEDWrite '1' to disable interrupt for event TXSTARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWWRITEWrite '1' to disable interrupt for event WRITE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREADWrite '1' to disable interrupt for event READ
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

ERRORSRC

Address offset: 0x4D0

Error source

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARW
W1C
OVERFLOWRX buffer overflow detected, and prevented
NotDetected0Error did not occur
Detected1Error occurred
BRW
W1C
DNACKNACK sent after receiving a data byte
NotReceived0Error did not occur
Received1Error occurred
CRW
W1C
OVERREADTX buffer over-read detected, and prevented
NotDetected0Error did not occur
Detected1Error occurred

MATCH

Address offset: 0x4D4

Status register indicating which address had a match

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARMATCH[0..1]Indication of which address in ADDRESS that matched the incoming address

ENABLE

Address offset: 0x500

Enable TWIS

Bit number313029282726252423222120191817161514131211109876543210
IDAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENABLEEnable or disable TWIS
Disabled0Disable TWIS
Enabled9Enable TWIS

PSEL.SCL

Address offset: 0x508

Pin select for SCL signal

Bit number313029282726252423222120191817161514131211109876543210
IDCBAAAAA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
ARWPIN[0..31]Pin number
BRWPORT[0..1]Port number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

PSEL.SDA

Address offset: 0x50C

Pin select for SDA signal

Bit number313029282726252423222120191817161514131211109876543210
IDCBAAAAA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
ARWPIN[0..31]Pin number
BRWPORT[0..1]Port number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

RXD

RXD EasyDMA channel

RXD.PTR

Address offset: 0x534

RXD Data pointer

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPTR

RXD Data pointer

See the memory chapter for details about which memories are available for EasyDMA.

RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in RXD buffer

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWMAXCNT[0..0xFFFF]Maximum number of bytes in RXD buffer

RXD.AMOUNT

Address offset: 0x53C

Number of bytes transferred in the last RXD transaction

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNT[0..0xFFFF]Number of bytes transferred in the last RXD transaction

RXD.LIST

Address offset: 0x540

EasyDMA list type

Bit number313029282726252423222120191817161514131211109876543210
IDAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLISTList type
Disabled0Disable EasyDMA list
ArrayList1Use array list

TXD

TXD EasyDMA channel

TXD.PTR

Address offset: 0x544

TXD Data pointer

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPTR

TXD Data pointer

See the memory chapter for details about which memories are available for EasyDMA.

TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in TXD buffer

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWMAXCNT[0..0xFFFF]Maximum number of bytes in TXD buffer

TXD.AMOUNT

Address offset: 0x54C

Number of bytes transferred in the last TXD transaction

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNT[0..0xFFFF]Number of bytes transferred in the last TXD transaction

TXD.LIST

Address offset: 0x550

EasyDMA list type

Bit number313029282726252423222120191817161514131211109876543210
IDAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLISTList type
Disabled0Disable EasyDMA list
ArrayList1Use array list

ADDRESS[0]

Address offset: 0x588

TWI slave address 0

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWADDRESSTWI slave address

ADDRESS[1]

Address offset: 0x58C

TWI slave address 1

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWADDRESSTWI slave address

CONFIG

Address offset: 0x594

Configuration register for the address match mechanism

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARWADDRESS0Enable or disable address matching on ADDRESS[0]
Disabled0Disabled
Enabled1Enabled
BRWADDRESS1Enable or disable address matching on ADDRESS[1]
Disabled0Disabled
Enabled1Enabled

ORC

Address offset: 0x5C0

Over-read character. Character sent out in case of an over-read of the transmit buffer.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWORCOver-read character. Character sent out in case of an over-read of the transmit buffer.

Electrical specification

TWIS slave timing specifications

SymbolDescriptionMin.Typ.Max.Units
fTWIS,SCLBit rates for TWIS1100400kbps
tTWIS,STARTTime from PREPARERX/PREPARETX task to ready to receive/transmit1.5µs
tTWIS,SU_DATData setup time before positive edge on SCL – all modes300ns
tTWIS,HD_DATData hold time after negative edge on SCL – all modes500ns
tTWIS,HD_STA,100kbpsTWI slave hold time from for START condition (SDA low to SCL low), 100 kbps5200ns
tTWIS,HD_STA,400kbpsTWI slave hold time from for START condition (SDA low to SCL low), 400 kbps1300ns
tTWIS,SU_STO,100kbpsTWI slave setup time from SCL high to STOP condition, 100 kbps5200ns
tTWIS,SU_STO,400kbpsTWI slave setup time from SCL high to STOP condition, 400 kbps1300ns
tTWIS,BUF,100kbpsTWI slave bus free time between STOP and START conditions, 100 kbps4700ns
tTWIS,BUF,400kbpsTWI slave bus free time between STOP and START conditions, 400 kbps1300ns
Figure 7. TWIS timing diagram, 1 byte transaction
TWIS timing diagram, 1 byte transaction
1 High bit rates or stronger pull-ups may require GPIOs to be set as High Drive, see GPIO chapter for more details.