Product Specs

Table Of Contents
33 TWIM I
2
C compatible two-wire interface
master with EasyDMA
Page
310
Figure 83: A double repeated start sequence using the SUSPEND task to secure safe operation in low
priority interrupts
33.6 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.
33.7 Master mode pin configuration
The SCL and SDA signals associated with the TWI master 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 master
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, PSEL.SDA must only be configured when the TWI master is disabled.
To secure correct signal levels on the pins used by the TWI master when the system is in OFF mode, and
when the TWI master is disabled, these pins must be configured in the GPIO peripheral as described in
Table 73: GPIO configuration before enabling peripheral on page 310.
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 73: GPIO configuration before enabling peripheral
TWI master signal
TWI master pin
Direction
Output value
Drive strength
SCL
As specified in PSEL.SCL
Input
Not applicable
S0D1
SDA
As specified in PSEL.SDA
Input
Not applicable
S0D1
33.8 Registers
Table 74: Instances
Base address Peripheral
Instance
Description
Configuration
0x40003000 TWIM
TWIM0
Two-wire interface master 0
0x40004000 TWIM
TWIM1
Two-wire interface master 1
ADDR
Stretch
0
ADDR
0
ADDR
1
0
2
1
4
3
5
STOP
ACK
ACK
ACK
WRITE
RESTART
NACK
ACK
READ
RESTART
ACK
ACK
WRITE
START
CPU Lifeline
TWI
TXD.MAXCNT = 1
STARTTX
SUSPEND
LASTTX
RXD.MAXCNT = 1
TXD.MAXCNT = 2
SUSPENDED
STARTRX
RESUME
STARTTX
LASTRX
STOP
LASTTX
STOPPED