The DMA interface has a configurable threshold value that controls the level of entries that triggers the burst handshaking request used for DMA integration.
For the TX threshold, if the number of entries in the TX FIFO is at or below the set threshold, a DMA handshaking request will be made. The valid range for the TX threshold is 0 - (ALT_I2C_TX_FIFO_NUM_ENTRIES - 1).
For the RX threshold, if the number of entries in the RX FIFO is above the set threshold, a DMA handshaking request will be made. The valid range for the RX treshold is 0 - (ALT_I2C_TX_FIFO_NUM_ENTRIES - 1).
Having a higher threshold can improve the AXI bus utilization at the expense of the likelyhoold of overflow / underflow conditions.
◆ alt_i2c_rx_dma_threshold_get()
Gets the current RX DMA threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | [out] The threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_rx_dma_threshold_set()
Sets the current RX DMA threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | The threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_tx_dma_threshold_get()
Gets the current TX DMA threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | [out] The threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
◆ alt_i2c_tx_dma_threshold_set()
Sets the current TX DMA threshold level value.
- Parameters
-
i2c_dev | A pointer to the I2C controller device block instance. |
threshold | The threshold value. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |