Product Specs

Table Of Contents
34 TWIS I
2
C compatible two-wire interface
slave with EasyDMA
Page
320
PREPARETX
ENABLE
PREPARERX
/ STOPPED
Unprepare TX,
Unprepare RX
IDLE
STOP
[ READ && (TX prepared) ]
[ WRITE && (RX prepared) ]
Restart sequence
TX
RX
Stop sequence
entry / Unprepare TX
entry / TXSTARTED
entry / Unprepare RX
entry / RXSTARTED
Figure 88: TWI slave state machine
Table 76: TWI slave state machine symbols
Symbol
Type
Description
ENABLE
Register
The TWI slave has been enabled via the ENABLE register
PREPARETX
Task
The TASKS_PREPARETX task has been triggered
STOP
Task
The TASKS_STOP task has been triggered
PREPARERX
Task
The TASKS_PREPARERX task has been triggered
STOPPED
Event
The EVENTS_STOPPED event was generated
RXSTARTED
Event
The EVENTS_RXSTARTED event was generated
TXSTARTED
Event
The EVENTS_TXSTARTED event was generated
TX prepared
Internal
Internal flag indicating that a TASKS_PREPARETX task has been triggered. This flag is not visible to the user.
RX prepared
Internal
Internal flag indicating that a TASKS_PREPARERX task has been triggered. This flag is not visible to the user.
Unprepare TX
Internal
Clears the internal 'TX prepared' flag until next TASKS_PREPARETX task.
Unprepare RX
Internal
Clears the internal 'RX prepared' flag until next TASKS_PREPARERX task.
Stop sequence
TWI protocol
A TWI stop sequence was detected
Restart sequence
TWI protocol
A TWI restart sequence was detected
The TWI slave supports clock stretching performed by the master.
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 behaviour 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 behaviour.