nRF5 SDK v15.0.0
Infineon I2C Protocol Stack Library

The Infineon I2C Protocol Stack library enables communication with Infineon OPTIGA™ Trust X products. The protocol stack consists of three layers that relate to the ISO OSI (Open Systems Interconnection) model: transport, data link and physical. Beneath is a host-specific platform abstraction layer (PAL), which interfaces to a host's I2C driver or I2C peripheral.

Note
This documentation provides an informal overview of the Infineon I2C Protocol Stack. For more information, visit Infineon.com - OPTIGA™ Trust X SLS 32AIA.

Stack Layers

Transport Layer (TL)

The transport layer provides a single transceiver interface to send an application protocol data unit (APDU) to a device, and to subsequently retrieve the response APDU. The layer is responsible for chaining, i.e., fragmenting APDUs larger than the maximum packet size, and reassembling received packets back into APDUs.

Therefore, the TL provides a single transceive function to asynchronously send an APDU and receive the respective response APDU: ifx_i2c_tl_transceive().

The transport layer must be initialized by the higher layer using the ifx_i2c_tl_init() function.

Data Link Layer (DL)

The data link layer provides error correction on top of the physical layer's raw transmission facility.

Therefore, the DL provides two functions to asynchronously send and receive error-free data frames:

  1. ifx_i2c_dl_send_frame()
  2. ifx_i2c_dl_receive_frame()

The data link layer must be initialized by the higher layer using the ifx_i2c_dl_init() function.

Physical Layer (PL)

The physical layer provides two functions to asynchronously send and receive raw data frames:

  1. ifx_i2c_pl_send_frame()
  2. ifx_i2c_pl_receive_frame()

Internally, the PL accesses registers on the Trust X device:

  1. The PL_REG_DATA register is used to read from or write to the device.
  2. The PL_REG_DATA_REG_LEN register holds the maximum data register length.
  3. The PL_REG_I2C_STATE register provides the I2C state with regard to the features supported by the Infineon device; and whether the device is busy executing an operation or ready to return a response.

The physical layer is intended to be initialized by the higher layer using the ifx_i2c_pl_init() function.

Platform Abstraction Layer (PAL)

The PAL separates hardware-specific APIs and module interfaces from the portable and platform-independent implementation of the Infineon I2C Protocol Stack Library.

The nRF52-specific implementation of the Infineon I2C PAL module can be found in the following files:

The PAL implementation for nRF52 uses the TWI transaction manager (nrf_twi_mngr.h) as interface to the I2C hardware.


Documentation feedback | Developer Zone | Subscribe | Updated