RTEMS: SDA Hold Time Configuration

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
SDA Hold Time Configuration
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » I2C Controller API

## Functions
ALT_STATUS_CODE | alt_i2c_sda_hold_time_get (ALT_I2C_DEV_t *i2c_dev, uint16_t *hold_time)
ALT_STATUS_CODE | alt_i2c_sda_hold_time_set (ALT_I2C_DEV_t *i2c_dev, const uint16_t hold_time)

## Detailed Description

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.

## Function Documentation

## ◆ alt_i2c_sda_hold_time_get()

ALT_STATUS_CODE alt_i2c_sda_hold_time_get | ( | ALT_I2C_DEV_t * | i2c_dev,
|  | uint16_t * | hold_time
| ) |  |

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()

ALT_STATUS_CODE alt_i2c_sda_hold_time_set | ( | ALT_I2C_DEV_t * | i2c_dev,
|  | const uint16_t | hold_time
| ) |  |

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