OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
ifx_i2c_config.c File Reference

This file provides the ifx i2c platform specific context configurations. More...

#include "pal_ifx_i2c_config.h"
#include "ifx_i2c_config.h"
Include dependency graph for ifx_i2c_config.c:

Variables

ifx_i2c_datastore_config_t ifx_i2c_datastore_config
 This is Data Store context. Only one context is supported per slave. More...
 
ifx_i2c_context_t ifx_i2c_context_0
 This is IFX I2C context. Only one context is supported per slave. More...
 

Detailed Description

This file provides the ifx i2c platform specific context configurations.

Copyright (c) 2019 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

\endcopyright

Author
Infineon Technologies AG

Variable Documentation

◆ ifx_i2c_context_0

ifx_i2c_context_t ifx_i2c_context_0
Initial value:
=
{
0x30,
400,
}
Data store configuration structure.
Definition: ifx_i2c_config.h:340
pal_gpio_t optiga_reset_0
Definition: pal_ifx_i2c_config_arduino.cpp:62
pal_i2c_t optiga_pal_i2c_context_0
Definition: pal_ifx_i2c_config_arduino.cpp:44
#define IFX_I2C_FRAME_SIZE
Data link layer: frame size (max supported is 277 decimal). Note: This can be configured externally t...
Definition: ifx_i2c_config.h:75
pal_gpio_t optiga_vdd_0
Definition: pal_ifx_i2c_config_arduino.cpp:56

This is IFX I2C context. Only one context is supported per slave.

IFX I2C Instance.

  • The following parameters in ifx_i2c_context_t must be initialized with appropriate values
    • slave address : Address of I2C slave
    • frame_size : Frame size in bytes. Minimum supported value is 16 bytes.
      • It is recommended not to use a value greater than the slave's frame size.
      • The user specified frame size is written to I2C slave's frame size register. The frame size register is read back from I2C slave. This frame value is used by the ifx-i2c protocol even if it is not equal to the user specified value.
    • frequency : Frequency/speed of I2C master in KHz.
      • This must be lowest of the maximum frequency supported by the devices (master/slave) connected on the bus.
      • Initial negotiation starts with a frequency of 100KHz.
      • If the user specified frequency is more than 400 KHz, the I2C slave is configured to operate in "Fm+" mode, otherwise the I2C slave is configured for "SM & Fm" mode.
      • If the user specified frequency negotiation fails, the I2C master frequency remains at 100KHz
    • upper_layer_event_handler : Upper layer event handler. This is invoked when ifx_i2c_open() is asynchronously completed.
    • upper_layer_ctx : Context of upper layer.
    • p_slave_vdd_pin : GPIO pin for VDD. If not set, cold reset is not done.
    • p_slave_reset_pin : GPIO pin for Reset. If not set, warm reset is not done.
    • ifx_i2c_datastore_config : Data store configuration instance
  • The other fields must be initialized by the user of the structure.

◆ ifx_i2c_datastore_config

Initial value:
=
{
0x40,
}
#define OPTIGA_COMMS_MANAGE_CONTEXT_ID
Definition: pal_os_datastore.h:59
#define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID
Identifier to store and read OPTIGA Platform Binding Shared secret on host platform.
Definition: pal_os_datastore.h:49
#define PROTOCOL_VERSION_PRE_SHARED_SECRET
Pre shared secret protocol version.
Definition: ifx_i2c_config.h:172

This is Data Store context. Only one context is supported per slave.

  • The following parameters in ifx_i2c_datastore_config_t must be initialized with appropriate values
    • protocol_version : Protocol version supported for secure communication.
    • datastore_shared_secret_id : ID to read and write the shared secret.
    • datastore_shared_secret_id : ID to read and write the shielded connection context data.
    • shared_secret_length : Max supported shared secret length.