34.10.1 Control A
Name: | CTRLA |
Offset: | 0x00 |
Reset: | 0x00000000 |
Property: | PAC Write-Protection, Enable-Protected, Write-Synchronized |
Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
LOWTOUT | INACTOUT[1:0] | SCLSM | SPEED[1:0] | ||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
Reset | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
SEXTTOEN | MEXTTOEN | PINOUT | |||||||
Access | R/W | R/W | R/W | ||||||
Reset | 0 | 0 | 0 |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
Access | |||||||||
Reset |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
RUNSTDBY | MODE[2:0] | ENABLE | SWRST | ||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
Reset | 0 | 0 | 0 | 0 | 0 | 0 |
Bit 30 – LOWTOUT SCL Low Time-Out
This bit enables the SCL low time-out. If SCL is held low for 25-35 ms, the host releases its clock hold, if enabled, and complete the current transaction. A stop condition will automatically be transmitted.
INTFLAG.SB or INTFLAG.MB is set as normal but the clock hold is released. The STATUS.LOWTOUT and STATUS.BUSERR status bits is set.
This bit is not synchronized.
Value | Description |
---|---|
0 | Time-out disabled. |
1 | Time-out enabled. |
Bits 29:28 – INACTOUT[1:0] Inactive Time-Out
If the inactive bus time-out is enabled and the bus is inactive for longer than the time-out setting, the bus state logic is set to Idle. An inactive bus arises when either an I2C host or client is holding the SCL low.
Enabling this option is necessary for SMBus compatibility but can also be used in a non-SMBus setup.
Calculated time-out periods are based on a 100 kHz baud rate.
These bits are not synchronized.
Value | Name | Description |
---|---|---|
0x0 | DIS | Disabled |
0x1 | 55US | 5-6 SCL cycle time-out (50-60 µs) |
0x2 | 105US | 10-11 SCL cycle time-out (100-110 µs) |
0x3 | 205US | 20-21 SCL cycle time-out (200-210 µs) |
Bit 27 – SCLSM SCL Clock Stretch Mode
This bit controls when SCL is stretched for software interaction.
This bit is not synchronized.
Value | Description |
---|---|
0 | SCL stretch according to Figure 34-5. |
1 | SCL stretch only after ACK bit according to Figure 34-6. |
Bits 25:24 – SPEED[1:0] Transfer Speed
These bits define bus speed.
These bits are not synchronized.
Value | Description |
---|---|
0x0 | Standard-mode (Sm) up to 100 kHz and Fast-mode (Fm) up to 400 kHz |
0x1 | Fast-mode Plus (Fm+) up to 1 MHz |
0x2 | Reserved |
0x3 | Reserved |
Bit 23 – SEXTTOEN Client SCL Low Extend Time-Out
This bit enables the client SCL low extend time-out. If SCL is cumulatively held low for greater than 25 ms from the initial START to a STOP, the host releases its clock hold, if enabled, and completes the current transaction. A STOP will automatically be transmitted.
SB or MB is set as normal but CLKHOLD is release. The MEXTTOUT and BUSERR status bits is set.
This bit is not synchronized.
Value | Description |
---|---|
0 | Time-out disabled |
1 | Time-out enabled |
Bit 22 – MEXTTOEN Host SCL Low Extend Time-Out
This bit enables the host SCL low extend time-out. If SCL is cumulatively held low for greater than 10 ms from START-to-ACK, ACK-to-ACK or ACK-to-STOP the host releases its clock hold if enabled and completes the current transaction. A STOP will automatically be transmitted.
SB or MB is set as normal but CLKHOLD is released. The MEXTTOUT and BUSERR status bits is set.
This bit is not synchronized.
Value | Description |
---|---|
0 | Time-out disabled |
1 | Time-out enabled |
Bit 16 – PINOUT Pin Usage
This bit sets the pin usage to either two- or four-wire operation:
This bit is not synchronized.
Value | Description |
---|---|
0 | Four-wire operation disabled. |
1 | Four-wire operation enabled. |
Bit 7 – RUNSTDBY Run in Standby
This bit defines the functionality in the Standby Sleep mode.
This bit is not synchronized.
Value | Description |
---|---|
0 | GCLK_SERCOMx_CORE is disabled and the I2C host will not operate in the Standby Sleep mode. |
1 | GCLK_SERCOMx_CORE is enabled in all Sleep modes. |
Bits 4:2 – MODE[2:0] Operating Mode
These bits must be written to 0x5 to select the I2C host serial communication interface of the SERCOM.
These bits are not synchronized.
Bit 1 – ENABLE Enable
Due to synchronization, there is delay from writing CTRLA.ENABLE until the peripheral is enabled/disabled. The value written to CTRL.ENABLE reads back immediately and the Synchronization Enable Busy bit in the Synchronization Busy register (SYNCBUSY.ENABLE) is set. SYNCBUSY.ENABLE is cleared when the operation is complete.
This bit is not enable-protected.
Value | Description |
---|---|
0 | The peripheral is disabled or being disabled. |
1 | The peripheral is enabled. |
Bit 0 – SWRST Software Reset
Writing ‘0
’ to this bit has no effect.
Writing ‘1
’ to this bit resets all registers in the SERCOM, except DBGCTRL, to their initial state and the SERCOM is disabled.
Writing ‘1
’ to CTRLA.SWRST always takes precedence, meaning that all other writes in the same write operation is discarded. Any register write access during the ongoing Reset results in an APB error. Reading any register returns the Reset value of the register.
Due to synchronization, there is a delay from writing CTRLA.SWRST until the Reset is complete. CTRLA.SWRST and SYNCBUSY.SWRST will both be cleared when the Reset is complete.
Value | Description |
---|---|
0 | There is no Reset operation ongoing. |
1 | The Reset operation is ongoing. |