Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

OPTIGA™ Trust M: Interfacing OPTIGA™ Trust M with a PSoC™ 6 device – KBA235405

OPTIGA™ Trust M: Interfacing OPTIGA™ Trust M with a PSoC™ 6 device – KBA235405

IFX_Publisher2
Community Manager
Community Manager
Community Manager
1000 replies posted First like given 750 replies posted

Community  Translation: OPTIGA™ Trust M: 如何将OPTIGA™ Trust M 与 PSoC™ 6 整合 – KBA235405

Version: **

Connect the host microcontroller PSoC™ 6 to Shield2Go Security OPTIGA™ Trust M via the shielded I2C interface with an additional layer of security as shown in Figure 1.

BinduPriya_G_0-1655457376095.pngFigure 1   I2C connections between Shield2Go Security OPTIGA™ Trust M and PSoC™ 6 MCU

Hardware:

  • Any PSoC™ 6 device.
  • Shield2Go Security OPTIGA™ Trust M.

Software:

To interface OPTIGA™ Trust M with PSoC™ 62S2 evaluation kits, CY8CEVAL-062S2 or CY8CEVAL-062S2-LAI-4373M, do the following:

  1. Launch ModusToolbox™ software.
  2. In the Eclipse IDE, click New Application from the Quick Panel.
  3. Select the Board Support Package (BSP) that you want to work with. See Getting Started with ModusToolbox™ to create applications.
  4.  Click the Peripherals dropdown and select the OPTIGA™ Cryptography template application and click Create as shown in Figure 2.              
BinduPriya_G_1-1655457543945.png Figure  2      Selection of OPTIGA™ Cryptography template application

  1. After the application is imported successfully, build and program the OPTIGA_Cryptography application to test the available examples.
  2. Tera Term displays the output, follow the steps in OPTIGA™: Cryptography to program the host MCU.

OPTIGA_Cryptography code examples in ModusToolbox™ software do not support PSoC™ 6 MCUs which do not have the OPTIGA™ Trust M kit package. The code examples can be cloned from the GitHub link.

To import the application, do the following:

  1. Open New Application and select the relevant BSP that you want to work with, for example, CY8CPROTO-062-4343W.
  2. Click Import and select the example folder you cloned.
  3. Select the imported code example from the Custom section, and click Create as shown in Figure 3.
BinduPriya_G_2-1655457696975.pngFigure  3    Selection of code example

  1. Change the supported hal library version to 1.6.0 by navigating to Library Manager > libraries > mtb-hal-cat1 (version: 1.6.0 release) and click Update.
  2. Add the OPTIGA™ Trust M library by navigating to Application Root Path > <mtb-example-optiga-crypto> > libs > mtb.mk file as shown in Figure 4.
  • Add SEARCH_optiga-trust-m=../mtb_shared/optiga-trust-m/release-v3.1.2  under # List of shared libraries.
  • Add SEARCH+=$(SEARCH_optiga-trust-m) under # Shared libraries added to build.
BinduPriya_G_4-1655457790355.png
Figure 4      Adding OPTIGA™ Trust M library

  1. Modify the optiga_lib_config_mtb.h file of the source folder per the MCU datasheet to provide the right I2C pin details (CYBSP_I2C_SCL and CYBSP_I2C_SDA) as shown in Figure 5.
BinduPriya_G_5-1655457877046.png

 

Figure 5     Modifying optiga_lib_config_mtb.

  1. Build the application after incorporating the above changes.
  2. Follow the steps mentioned in OPTIGA™: Cryptography to program the host MCU.

Note:      To replace the changes in the mtb.mk file, update the libraries by running library manager or make getlibs.

0 Likes
414 Views