The I2C protocol specification requires 300ns of hold time on the SDA signal in standard and fast speed modes. Board delays on the SCL and SDA signals can mean that the hold-time requirement is met at the I2C master, but not at the I2C slave (or vice-versa). Because each system may encounter differing board signal delays, the I2C controller provides the capability to adjust of the SDA hold-time.
The functions in this section provide software configuration of SDA hold time for the I2C controller.
◆ alt_i2c_sda_hold_time_get()
Gets the currently configured value for the SDA hold time in I2C controller clock (ALT_CLK_L4_SP) clock ticks.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
hold_time | [out] The configured SDA hold time in ALT_CLK_L4_SP clock ticks. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_sda_hold_time_set()
Sets the configured value for the SDA hold time in terms of I2C controller clock (ALT_CLK_L4_SP) clock ticks.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
hold_time | The SDA hold time in ALT_CLK_L4_SP clock ticks. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |