TWIS — I2C compatible two-wire interface target with EasyDMA

The TWI target peripheral (TWIS) with EasyDMA provides a half duplex, two-wire synchronous serial communication interface.

The main features of TWIS are the following:

Figure 1. TWIS with EasyDMA
TWI slave with EasyDMA

A typical TWI setup consists of one controller and one or more targets, as seen in the following figure. Only a single controller can be used on the TWI bus.

Figure 2. Typical TWI setup with one controller and three targets
A typical TWI setup comprising one master and three slaves

State machine

The following figure shows the TWIS state machine.

Figure 3. TWIS 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
ENABLERegisterTWIS enabled via the ENABLE register.
PREPARETXTaskThe TASKS_PREPARETX task was triggered.
STOPTaskThe TASKS_STOP task was triggered.
PREPARERXTaskThe TASKS_PREPARERX task was triggered.
STOPPEDEventThe EVENTS_STOPPED event was generated.
DMA.RX.READYEventThe EVENTS_DMA.RX.READY event was generated.
DMA.TX.READYEventThe EVENTS_DMA.TX.READY event was generated.
TX preparedInternalInternal flag indicating that a TASKS_PREPARETX task was triggered.
RX preparedInternalInternal flag indicating that a TASKS_PREPARERX task was triggered.
Unprepare TXInternalClears the TX prepared flag until the next TASKS_PREPARETX task.
Unprepare RXInternalClears the RX prepared flag until the next TASKS_PREPARERX task.
Stop conditionTWI protocolA TWI stop condition was detected.
Restart conditionTWI protocolA TWI restart condition was detected.

TWIS supports clock stretching. In order to use this feature, the controller must also support clock stretching for the feature to execute properly. TWIS operates in a low-power mode while waiting for the TWI controller to initiate a transfer. As long as TWIS is not addressed, it will remain in this mode.

For TWIS to run correctly, PSEL.SCL, PSEL.SDA, CONFIG, and the ADDRESS[n] registers must be configured, the SCL and SDA lines must both be high, before enabling TWIS through the ENABLE register. Similarly, changing these settings must be performed while TWIS is disabled. Failing to do so may result in unpredictable behavior.

Shared resources

The TWIS peripheral shares registers and other resources with peripherals that have the same ID as TWIS. Before TWIS can be configured and used, all peripherals that have the same ID as TWIS must be disabled.

Disabling a peripheral with the same ID as TWIS will not reset any shared TWIS registers. Configure all TWIS registers to ensure they operate correctly.

See the Instantiation table in Instantiation for details on peripherals and their IDs.

EasyDMA

TWIS implements EasyDMA for accessing RAM without CPU involvement.

TWIS implements the EasyDMA channels found in the following table.
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 is finished accessing the buffer in RAM.

Read command response

Before TWIS can respond to a read command, it must be configured and enabled in the ENABLE register. When enabled, TWIS is in the IDLE state.

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

TWIS can listen for two addresses at a time. This is configured in the ADDRESS registers and the CONFIG register.

TWIS only acknowledges (ACK) the read command if the address presented by the controller matches one of the addresses the target is configured to listen for. TWIS will generate a READ event when it acknowledges the read command.

TWIS only detects a read command from the IDLE state.

TWIS will set an internal TX prepared flag when the PREPARETX task is triggered.

When the read command is received, TWIS 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, TWIS will stretch the controller's clock until the PREPARETX task is triggered and the internal TX prepared flag is set.

TWIS will generate the EVENTS_DMA.TX.READY event and clear the TX prepared flag when it enters the TX state. In this state, TWIS will send the data bytes found in the transmit buffer to the controller using the controller's clock.

TWIS returns to the IDLE state if the TWIS receives a restart command when it is in the TX state.

TWIS is stopped when it receives the stop condition from TWIM. A STOPPED event will be generated when the transaction has stopped. TWIS will clear the TX prepared flag 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. TWIS will only be able to send TXD.MAXCNT bytes from the transmit buffer for each transaction. If TWIM forces TWIS to send more than TXD.MAXCNT bytes, the target will send the byte specified in the ORC register to the controller instead. If this happens, an ERROR event will be generated.

The EasyDMA configuration registers RXD.PTR, TXD.PTR, RXD.AMOUNT, and TXD.AMOUNT, are latched when the EVENTS_DMA.TX.READY event is generated.

TWIS can be forced to stop by triggering the STOP task. A STOPPED event will be generated when TWIS has stopped. TWIS will clear the TX prepared flag and return to the IDLE state when it has stopped, see Terminate an ongoing TWI transaction.

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

A typical TWIS read command response is illustrated in the following figure, including clock stretching following a SUSPEND task.

Figure 4. TWIS responding to a read command
TWIS responding to a read command

Write command response

Before TWIS can respond to a write command, TWIS must be configured and enabled in the ENABLE register. When enabled, TWIS is in the IDLE state.

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

TWIS can listen for two addresses at a time. This is configured in the ADDRESS registers and the CONFIG register.

TWIS only acknowledges (ACK) the write command if the address presented by the controller matches one of the addresses the target is configured to listen for. TWIS will generate a WRITE event when it acknowledges the write command.

TWIS only detects a write command from the IDLE state.

TWIS will set an internal RX prepared flag when the PREPARERX task is triggered.

When the write command is received, TWIS 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, TWIS will start stretching the master's clock after the first data byte, not allowing the master to send the stop condition. Clock is stretched until the PREPARERX task is triggered and the internal RX prepared flag is set.

TWIS will generate the EVENTS_DMA.RX.READY event and clear the internal RX prepared flag when it enters the RX state. In this state, TWIS will be able to receive the bytes sent by the TWIM.

TWIS returns to the IDLE state if TWIS receives a restart command when it is in the RX state.

TWIS is stopped when it receives the stop condition from TWIM. A STOPPED event will be generated when the transaction has stopped. TWIS will clear the internal RX prepared flag 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. TWIS can only receive as many bytes as specified in the RXD.MAXCNT register. If TWIM tries to send more bytes to TWIS than it can receive, the extra bytes are discarded and NACKed by the target. If this happens, an ERROR event will be generated.

The EasyDMA configuration registers, RXD.PTR, TXD.PTR, RXD.AMOUNT, and TXD.AMOUNT, are latched when the EVENTS_DMA.RX.READY event is generated.

TWIS can be forced to stop by triggering the STOP task. A STOPPED event will be generated when TWIS has stopped. TWIS will clear the internal RX prepared flag and return to the IDLE state when it has stopped, see Terminate an ongoing TWI transaction.

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

A typical TWIS write command response is illustrated in the following figure, including clock stretching following a SUSPEND task.

Figure 5. TWIS responding to a write command
TWIS responding to a write command

TWI controller repeated start sequence

A repeated start sequence is where the TWI controller writes two bytes to TWIS, followed by reading four bytes from the target. This is shown in the following figure.

Figure 6. Repeated start sequence
Repeated start sequence

In this example, the receiver does not know in advance what the controller wants to read. This information is in the first two received bytes of the write in the repeated start sequence. For the CPU to process the received data before TWIS replies to the read command, the SUSPEND task is triggered. This is enabled through 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.

Terminate an ongoing TWI transaction

In some situations, an ongoing transaction must be terminated. This can happen when the external TWI controller is not responding correctly, for example.

To stop an ongoing transaction, trigger the STOP task. A STOPPED event will be generated when TWIS stops. It is not dependent on the STOP condition being generated on the TWI bus. TWIS will release the bus when it has stopped and returns to its IDLE state.

Low power

When the peripheral is not needed, stop and disable TWIS for lowest possible power consumption.

When the STOP task is sent, the software must wait until the STOPPED event is received before disabling the peripheral through the ENABLE register. If the peripheral is already stopped, the STOP task is not needed.

Target mode pin configuration

The SCL and SDA signals are mapped to physical pins using the PSEL.SCL and PSEL.SDA registers.

The PSEL.SCL and PSEL.SDA registers and their configurations are only used when TWIS is enabled, and retained while the device is in System ON mode. When the peripheral is disabled, the pins function as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register. Only configure PSEL.SCL and PSEL.SDA when TWIS is disabled.

When in System OFF mode or when TWIS is disabled, the TWIS pins must be configured in the GPIO peripheral as described in the following table to secure correct signal levels.

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

Table 3. GPIO configuration before enabling peripheral
TWIS signalTWIS pinDirectionOutput valueDrive strength
SCLAs specified in PSEL.SCLInputNot applicableS0D1
SDAAs specified in PSEL.SDAInputNot applicableS0D1

Registers

Instances

InstanceDomainBase addressTrustZoneSplit accessDescription
MapAttDMA
TWIS20 : S
TWIS20 : NS
GLOBAL0x500C6000
0x400C6000
USSSANoTwo-wire interface target TWIS20
TWIS21 : S
TWIS21 : NS
GLOBAL0x500C7000
0x400C7000
USSSANoTwo-wire interface target TWIS21
TWIS30 : S
TWIS30 : NS
GLOBAL0x50104000
0x40104000
USSSANoTwo-wire interface target TWIS30

Configuration

InstanceDomainConfiguration
TWIS20 : S
TWIS20 : NS
GLOBALUse GPIO port P1
TWIS21 : S
TWIS21 : NS
GLOBALUse GPIO port P1
TWIS30 : S
TWIS30 : NS
GLOBALUse GPIO port P0

Register overview

RegisterOffsetTZDescription
TASKS_STOP0x004Stop TWI transaction
TASKS_SUSPEND0x00CSuspend TWI transaction
TASKS_RESUME0x010Resume TWI transaction
TASKS_PREPARERX0x020Prepare the TWI slave to respond to a write command
TASKS_PREPARETX0x024Prepare the TWI slave to respond to a read command
TASKS_DMA.RX.ENABLEMATCH[n]0x030Enables the MATCH[n] event by setting the ENABLE[n] bit in the CONFIG register.
TASKS_DMA.RX.DISABLEMATCH[n]0x040Disables the MATCH[n] event by clearing the ENABLE[n] bit in the CONFIG register.
SUBSCRIBE_STOP0x084Subscribe configuration for task STOP
SUBSCRIBE_SUSPEND0x08CSubscribe configuration for task SUSPEND
SUBSCRIBE_RESUME0x090Subscribe configuration for task RESUME
SUBSCRIBE_PREPARERX0x0A0Subscribe configuration for task PREPARERX
SUBSCRIBE_PREPARETX0x0A4Subscribe configuration for task PREPARETX
SUBSCRIBE_DMA.RX.ENABLEMATCH[n]0x0B0Subscribe configuration for task ENABLEMATCH[n]
SUBSCRIBE_DMA.RX.DISABLEMATCH[n]0x0C0Subscribe configuration for task DISABLEMATCH[n]
EVENTS_STOPPED0x104TWI stopped
EVENTS_ERROR0x114TWI error
EVENTS_WRITE0x13CWrite command received
EVENTS_READ0x140Read command received
EVENTS_DMA.RX.END0x14CGenerated after all MAXCNT bytes have been transferred
EVENTS_DMA.RX.READY0x150Generated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.
EVENTS_DMA.RX.BUSERROR0x154An error occured during the bus transfer.
EVENTS_DMA.RX.MATCH[n]0x158Pattern match is detected on the DMA data bus.
EVENTS_DMA.TX.END0x168Generated after all MAXCNT bytes have been transferred
EVENTS_DMA.TX.READY0x16CGenerated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.
EVENTS_DMA.TX.BUSERROR0x170An error occured during the bus transfer.
PUBLISH_STOPPED0x184Publish configuration for event STOPPED
PUBLISH_ERROR0x194Publish configuration for event ERROR
PUBLISH_WRITE0x1BCPublish configuration for event WRITE
PUBLISH_READ0x1C0Publish configuration for event READ
PUBLISH_DMA.RX.END0x1CCPublish configuration for event END
PUBLISH_DMA.RX.READY0x1D0Publish configuration for event READY
PUBLISH_DMA.RX.BUSERROR0x1D4Publish configuration for event BUSERROR
PUBLISH_DMA.RX.MATCH[n]0x1D8Publish configuration for event MATCH[n]
PUBLISH_DMA.TX.END0x1E8Publish configuration for event END
PUBLISH_DMA.TX.READY0x1ECPublish configuration for event READY
PUBLISH_DMA.TX.BUSERROR0x1F0Publish configuration for event BUSERROR
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
ADDRESS[n]0x588TWI slave address n
CONFIG0x594Configuration register for the address match mechanism
ORC0x5C0Over-read character. Character sent out in case of an over-read of the transmit buffer.
PSEL.SCL0x600Pin select for SCL signal
PSEL.SDA0x604Pin select for SDA signal
DMA.RX.PTR0x704RAM buffer start address
DMA.RX.MAXCNT0x708Maximum number of bytes in channel buffer
DMA.RX.AMOUNT0x70C

Number of bytes transferred in the last transaction, updated after the END event.

Also updated after each MATCH event.

DMA.RX.TERMINATEONBUSERROR0x71CTerminate the transaction if a BUSERROR event is detected.
DMA.RX.BUSERRORADDRESS0x720Address of transaction that generated the last BUSERROR event.
DMA.RX.MATCH.CONFIG0x724Configure individual match events
DMA.RX.MATCH.CANDIDATE[n]0x728The data to look for - any match will trigger the MATCH[n] event, if enabled.
DMA.TX.PTR0x73CRAM buffer start address
DMA.TX.MAXCNT0x740Maximum number of bytes in channel buffer
DMA.TX.AMOUNT0x744

Number of bytes transferred in the last transaction, updated after the END event.

Also updated after each MATCH event.

DMA.TX.TERMINATEONBUSERROR0x754Terminate the transaction if a BUSERROR event is detected.
DMA.TX.BUSERRORADDRESS0x758Address of transaction that generated the last BUSERROR event.

TASKS_STOP

Address offset: 0x004

Stop TWI transaction

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

TASKS_SUSPEND

Address offset: 0x00C

Suspend TWI transaction

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

TASKS_RESUME

Address offset: 0x010

Resume TWI transaction

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

TASKS_PREPARERX

Address offset: 0x020

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: 0x024

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

TASKS_DMA

Peripheral tasks.

TASKS_DMA.RX

Peripheral tasks.

TASKS_DMA.RX.ENABLEMATCH[n]

Address offset: 0x030 + (n × 0x4)

Enables the MATCH[n] event by setting the ENABLE[n] bit in the CONFIG register.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWENABLEMATCHEnables the MATCH[n] event by setting the ENABLE[n] bit in the CONFIG register.
Trigger1Trigger task
TASKS_DMA.RX.DISABLEMATCH[n]

Address offset: 0x040 + (n × 0x4)

Disables the MATCH[n] event by clearing the ENABLE[n] bit in the CONFIG register.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWDISABLEMATCHDisables the MATCH[n] event by clearing the ENABLE[n] bit in the CONFIG register.
Trigger1Trigger task

SUBSCRIBE_STOP

Address offset: 0x084

Subscribe configuration for task STOP

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task STOP will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_SUSPEND

Address offset: 0x08C

Subscribe configuration for task SUSPEND

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task SUSPEND will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_RESUME

Address offset: 0x090

Subscribe configuration for task RESUME

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task RESUME will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_PREPARERX

Address offset: 0x0A0

Subscribe configuration for task PREPARERX

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task PREPARERX will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_PREPARETX

Address offset: 0x0A4

Subscribe configuration for task PREPARETX

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task PREPARETX will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_DMA

Subscribe configuration for tasks

SUBSCRIBE_DMA.RX

Subscribe configuration for tasks

SUBSCRIBE_DMA.RX.ENABLEMATCH[n]

Address offset: 0x0B0 + (n × 0x4)

Subscribe configuration for task ENABLEMATCH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task ENABLEMATCH[n] will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription
SUBSCRIBE_DMA.RX.DISABLEMATCH[n]

Address offset: 0x0C0 + (n × 0x4)

Subscribe configuration for task DISABLEMATCH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task DISABLEMATCH[n] will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

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: 0x114

TWI error

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

EVENTS_WRITE

Address offset: 0x13C

Write command received

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

EVENTS_READ

Address offset: 0x140

Read command received

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

EVENTS_DMA

Peripheral events.

EVENTS_DMA.RX

Peripheral events.

EVENTS_DMA.RX.END

Address offset: 0x14C

Generated after all MAXCNT bytes have been transferred

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENDGenerated after all MAXCNT bytes have been transferred
NotGenerated0Event not generated
Generated1Event generated
EVENTS_DMA.RX.READY

Address offset: 0x150

Generated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWREADYGenerated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.
NotGenerated0Event not generated
Generated1Event generated
EVENTS_DMA.RX.BUSERROR

Address offset: 0x154

An error occured during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWBUSERROR

An error occured during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

NotGenerated0Event not generated
Generated1Event generated
EVENTS_DMA.RX.MATCH[n]

Address offset: 0x158 + (n × 0x4)

Pattern match is detected on the DMA data bus.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWMATCHPattern match is detected on the DMA data bus.
NotGenerated0Event not generated
Generated1Event generated

EVENTS_DMA.TX

Peripheral events.

EVENTS_DMA.TX.END

Address offset: 0x168

Generated after all MAXCNT bytes have been transferred

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENDGenerated after all MAXCNT bytes have been transferred
NotGenerated0Event not generated
Generated1Event generated
EVENTS_DMA.TX.READY

Address offset: 0x16C

Generated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWREADYGenerated when EasyDMA has buffered the .PTR and .MAXCNT registers for the channel, allowing them to be written to prepare for the next sequence.
NotGenerated0Event not generated
Generated1Event generated
EVENTS_DMA.TX.BUSERROR

Address offset: 0x170

An error occured during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWBUSERROR

An error occured during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

NotGenerated0Event not generated
Generated1Event generated

PUBLISH_STOPPED

Address offset: 0x184

Publish configuration for event STOPPED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event STOPPED will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_ERROR

Address offset: 0x194

Publish configuration for event ERROR

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event ERROR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_WRITE

Address offset: 0x1BC

Publish configuration for event WRITE

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event WRITE will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_READ

Address offset: 0x1C0

Publish configuration for event READ

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event READ will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_DMA

Publish configuration for events

PUBLISH_DMA.RX

Publish configuration for events

PUBLISH_DMA.RX.END

Address offset: 0x1CC

Publish configuration for event END

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event END will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing
PUBLISH_DMA.RX.READY

Address offset: 0x1D0

Publish configuration for event READY

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event READY will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing
PUBLISH_DMA.RX.BUSERROR

Address offset: 0x1D4

Publish configuration for event BUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event BUSERROR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing
PUBLISH_DMA.RX.MATCH[n]

Address offset: 0x1D8 + (n × 0x4)

Publish configuration for event MATCH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event MATCH[n] will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_DMA.TX

Publish configuration for events

PUBLISH_DMA.TX.END

Address offset: 0x1E8

Publish configuration for event END

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event END will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing
PUBLISH_DMA.TX.READY

Address offset: 0x1EC

Publish configuration for event READY

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event READY will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing
PUBLISH_DMA.TX.BUSERROR

Address offset: 0x1F0

Publish configuration for event BUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event BUSERROR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

SHORTS

Address offset: 0x200

Shortcuts between local events and tasks

Bit number313029282726252423222120191817161514131211109876543210
IDJIHGFEDCBA
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
C-FRWDMA_RX_MATCH[i]_DMA_RX_ENABLEMATCH[(i+1)%4] (i=0..3)

Shortcut between event DMA.RX.MATCH[n] and task DMA.RX.ENABLEMATCH[(i+1)%4]

Allows daisy-chaining match events.

Disabled0Disable shortcut
Enabled1Enable shortcut
G-JRWDMA_RX_MATCH[i]_DMA_RX_DISABLEMATCH[i] (i=0..3)Shortcut between event DMA.RX.MATCH[n] and task DMA.RX.DISABLEMATCH[n]
Disabled0Disable shortcut
Enabled1Enable shortcut

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDNMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSTOPPEDEnable or disable interrupt for event STOPPED
Disabled0Disable
Enabled1Enable
BRWERROREnable or disable interrupt for event ERROR
Disabled0Disable
Enabled1Enable
CRWWRITEEnable or disable interrupt for event WRITE
Disabled0Disable
Enabled1Enable
DRWREADEnable or disable interrupt for event READ
Disabled0Disable
Enabled1Enable
ERWDMARXENDEnable or disable interrupt for event DMARXEND
Disabled0Disable
Enabled1Enable
FRWDMARXREADYEnable or disable interrupt for event DMARXREADY
Disabled0Disable
Enabled1Enable
GRWDMARXBUSERROR

Enable or disable interrupt for event DMARXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Disabled0Disable
Enabled1Enable
H-KRWDMARXMATCH[i] (i=0..3)Enable or disable interrupt for event DMARXMATCH[i]
Disabled0Disable
Enabled1Enable
LRWDMATXENDEnable or disable interrupt for event DMATXEND
Disabled0Disable
Enabled1Enable
MRWDMATXREADYEnable or disable interrupt for event DMATXREADY
Disabled0Disable
Enabled1Enable
NRWDMATXBUSERROR

Enable or disable interrupt for event DMATXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Disabled0Disable
Enabled1Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDNMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARW
W1S
STOPPEDWrite '1' to enable interrupt for event STOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRW
W1S
ERRORWrite '1' to enable interrupt for event ERROR
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRW
W1S
WRITEWrite '1' to enable interrupt for event WRITE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRW
W1S
READWrite '1' to enable interrupt for event READ
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERW
W1S
DMARXENDWrite '1' to enable interrupt for event DMARXEND
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRW
W1S
DMARXREADYWrite '1' to enable interrupt for event DMARXREADY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRW
W1S
DMARXBUSERROR

Write '1' to enable interrupt for event DMARXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
H-KRW
W1S
DMARXMATCH[i] (i=0..3)Write '1' to enable interrupt for event DMARXMATCH[i]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRW
W1S
DMATXENDWrite '1' to enable interrupt for event DMATXEND
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRW
W1S
DMATXREADYWrite '1' to enable interrupt for event DMATXREADY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
NRW
W1S
DMATXBUSERROR

Write '1' to enable interrupt for event DMATXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDNMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARW
W1C
STOPPEDWrite '1' to disable interrupt for event STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRW
W1C
ERRORWrite '1' to disable interrupt for event ERROR
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRW
W1C
WRITEWrite '1' to disable interrupt for event WRITE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRW
W1C
READWrite '1' to disable interrupt for event READ
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERW
W1C
DMARXENDWrite '1' to disable interrupt for event DMARXEND
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRW
W1C
DMARXREADYWrite '1' to disable interrupt for event DMARXREADY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRW
W1C
DMARXBUSERROR

Write '1' to disable interrupt for event DMARXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
H-KRW
W1C
DMARXMATCH[i] (i=0..3)Write '1' to disable interrupt for event DMARXMATCH[i]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRW
W1C
DMATXENDWrite '1' to disable interrupt for event DMATXEND
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRW
W1C
DMATXREADYWrite '1' to disable interrupt for event DMATXREADY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
NRW
W1C
DMATXBUSERROR

Write '1' to disable interrupt for event DMATXBUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

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

ADDRESS[n]

Address offset: 0x588 + (n × 0x4)

TWI slave address n

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
A-BRWADDRESS[i] (i=0..1)Enable or disable address matching on ADDRESS[i]
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.

PSEL.SCL

Address offset: 0x600

Pin select for SCL signal

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

PSEL.SDA

Address offset: 0x604

Pin select for SDA signal

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

DMA.RX.PTR

Address offset: 0x704

RAM buffer start address

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x2000000000100000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPTR

RAM buffer start address for this EasyDMA channel. This address is a word aligned Data RAM address.

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

DMA.RX.MAXCNT

Address offset: 0x708

Maximum number of bytes in channel buffer

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

DMA.RX.AMOUNT

Address offset: 0x70C

Number of bytes transferred in the last transaction, updated after the END event.

Also updated after each MATCH event.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNT[1..0xFFFF]Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte.

DMA.RX.TERMINATEONBUSERROR

Address offset: 0x71C

Terminate the transaction if a BUSERROR event is detected.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENABLE
Disabled0Disable
Enabled1Enable

DMA.RX.BUSERRORADDRESS

Address offset: 0x720

Address of transaction that generated the last BUSERROR event.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARADDRESS

DMA.RX.MATCH

Registers to control the behavior of the pattern matcher engine

DMA.RX.MATCH.CONFIG

Address offset: 0x724

Configure individual match events

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A-DRWENABLE[i] (i=0..3)Enable match filter i
Disabled0Match filter disabled
Enabled1Match filter enabled
E-HRWONESHOT[i] (i=0..3)

Configure match filter i as one-shot or sticky

One-shot match filters can be used together with shortcuts to check for continuous data sequences by disabling the filter if the next data is not a match.
Note: The presence of these shorts depends on the configuration of the peripheral integrating this EasyDMA.
Continuous0Match filter stays enabled until disabled by task
Oneshot1Match filter stays enabled until next data word is received

DMA.RX.MATCH.CANDIDATE[n]

Address offset: 0x728 + (n × 0x4)

The data to look for - any match will trigger the MATCH[n] event, if enabled.

Note: This register can be updated while a transfer is in progress, but the new value will not take effect until a match has been found or the transfer is done. That makes it possible to write a new set of match words which will be searched for immediately after the event triggers.
Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWDATAData to look for

DMA.TX.PTR

Address offset: 0x73C

RAM buffer start address

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x2000000000100000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPTR

RAM buffer start address for this EasyDMA channel. This address is a word aligned Data RAM address.

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

DMA.TX.MAXCNT

Address offset: 0x740

Maximum number of bytes in channel buffer

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

DMA.TX.AMOUNT

Address offset: 0x744

Number of bytes transferred in the last transaction, updated after the END event.

Also updated after each MATCH event.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNT[1..0xFFFF]Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte.

DMA.TX.TERMINATEONBUSERROR

Address offset: 0x754

Terminate the transaction if a BUSERROR event is detected.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENABLE
Disabled0Disable
Enabled1Enable

DMA.TX.BUSERRORADDRESS

Address offset: 0x758

Address of transaction that generated the last BUSERROR event.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARADDRESS