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

cross mob

OPTIGA™ Trust M Interface Guide for Windows

OPTIGA™ Trust M Interface Guide for Windows

rozario
Employee
Employee
5 sign-ins First like received First question asked

Hey there! Are you interested in securing your IoT devices? If so, you're in the right place! In this blog, we'll walk you through the process of setting up the tools and hardware needed to interface with the OPTIGA™ Trust M IoT Security Development Kit from your Windows PC. As someone who is passionate about IoT security, I'm excited to share this guide with you and help make the process of securing your devices as simple as possible. Plus, we'll also cover the installation and usage of ModusToolbox™, a powerful software suite that's integral to the OPTIGA™ Trust M interface. So, let's dive right in and get started!

PC requirements:

A 32-bit or 64-bit PC with Windows 7/10 Operating System with the below requirements need to be used for setting up the OPTIGA™ Trust M setup:

  1. One USB port
  2. Admin Rights for installing software

NOTE:

  1. Make sure you have admin access to the PC you are installing the software items as described
  2. Make sure you install ModusToolbox™ 3.0 or latest version
  3. Make sure the default users folder where ModusToolbox™ is going to be installed does not have a space in the name (make it one word) otherwise you will have issues
  4. Please also install this Laptop QR Code Scanner in your laptop (It will be useful for later blogs) https://apps.microsoft.com/store/detail/codex-qr-reader-generator/9NBLGGH5M02G?hl=en-us&gl=us

OPTIGA™ Trust M IoT Security Development Kit

This kit offers you an easy way to develop and evaluate end-to-end security use cases for your IoT devices. It enables you to prototype various security use cases and build full-featured IoT applications. The board includes:

  • OPTIGA™ Trust M security solution
  • PSoC™ 62, an Arm® Cortex®-M4/M0+ microcontroller
  • AIROC™ CYW43012 Wi-Fi & Bluetooth® combo chip is a low power device that supports dual-band (2.4 and 5.0 GHz) Wi-Fi and Bluetooth® 5.0.

For more information on the kit please refer the following links

Preliminary Board Test

We already linked the kit to the Infineon AWS IoT account and a public dashboard is available to show the live data. If you push the user button on the board live data will be sent from the kit which can be seen on the dashboard. This can be realized by following the below steps:

1. Create a Wi-Fi hotspot as follows -> SSID: Infineon and Password: tischtennis

NOTES:

  • Check with your phone carrier if they support hotspot
  •  Alternatively, you can temporarily name one of your Wi-Fi connections to the name and set the password as above
  • It requires 2.4GHz Wi-Fi connection
  • Sometimes you need to reset the board multiple times for the hotspot connection to work
  • If you need to reset the board to original configuration (reflash with the original content) for the demo, please contact Infineon

2. Hook up the board to a USB port with the micro USB cable that is shipped with the board (you should see a blue LED)

3. Use your phone to scan the QR code on the board to go to the website where it shows the SoC as PSoC™6 and also authenticates OPTIGA™ (It may take some time for authentication based on your Wi-Fi hot spot speed)

rozario_0-1703145253601.png

Figure 1: Web page that opens from QR code

  1. Please ensure that your phone does not go to sleep mode and hotspot remains active
  2. Wait for about 20-30 seconds for the board to connect to Wi-Fi hotspot
  3.  You can check the board Wi-Fi connection status via Tera Term Terminal app
  4. Once the board connection to hotspot is successful, you can press the user button multiple times and you can monitor the button status from the event log in the website as shown in figure 2

rozario_1-1703146326691.png

Figure 2: Website showing activities when you press the user button

Software Installation Steps

ModusToolbox™

  1. Download ModusToolbox™ Software from the link:  (Select Windows (x64) (exe) package) https://www.infineon.com/cms/en/design-support/tools/sdk/modustoolbox-software/
  2. Ensure you have admin rights before starting the installation
  3. Now run the ModusToolBox™ installer as admin (select install for me only)rozario_2-1703146410274.png
  4. Select Default Installation

Tera Term

  1. Download Open Source free terminal emulator Tera Term from the link: https://tera-term.en.softonic.com/
  2. Install with the default settings

Steps to launch an application on ModusToolbox™

  1. Connect the board to PC via the micro USB cable (you will see the blue and yellow LED turned on)
  2. Launch Eclipse IDE for ModusToolBox™ 3.0 (version may vary depending on the release)
    NOTE: Recommended to use default directory as workspace to avoid any dependency issues
  3. Click on New Application

rozario_3-1703146443933.png

Figure 3: Options to start new application   

  1. Project Creator application will open. Choose the BSP for this kit. Expand PSoC™6 BSPs and Select CYSBSYSKIT-DEV-01. Click next

rozario_4-1703146557195.png

 

Figure 4: BSP options

  1. Expand Peripherals and select OPTIGA Cryptography. Click Create (It will take few minutes to complete

rozario_5-1703146593506.png

Figure 5: Example options

  1. Once done, the Project Creator will automatically close and you will see the OPTIGA™ Cryptography readme file
  2. From the project explorer, select OPTIGA_Cryptography

rozario_6-1703146635014.png

Figure 6: Projects in workspace

  1. Right Click on the project and select build project (alternatively you can Choose the build option from the Quick Panel)
  2. Once completed, you should see the following in the console

rozario_7-1703146663237.png

Figure 7: Build console

  1. Launch Tera Term and Select Serial and choose the COM port that refers to the kit (note that the COM port number may vary from board to board). Click OK.

rozario_8-1703146690078.png

Figure 8: Tera Term window for new connection

  1. Go to the setup of the terminal and select Serial Port. In the setting change the speed to 115200 as shown in figure 9 (leave all other settings as default). Click on New setting.
    NOTE: Keep Tera Term Open as each time you close it, you need to reconfigure.

rozario_9-1703147320552.png

Figure 9: Serial port setup

  1. Go back to the Eclipse ModusToolbox™ IDE. Select The project OPTIGA_Cryptography and look for Launches in the Quick Panel.
    Programming:
    Click on OPTIGA_Cryptography Program as shown in figure 10 (please note that for this setup, only KitProg3_MiniProg4 applications can be run)

rozario_10-1703147345243.png

Figure 10: Options to run/debug example

In the Terminal, you should see the printed messages as shown in figure 11:

rozario_11-1703147371327.png

Figure 11: Output on Terminal

If you would like to clear the screen in the terminal (Tera Term) – go to edit – clear buffer.

Debugging:

If you would like to step through the code and explore then first make sure there are no previously launched threads that are running under the debug tab as shown in figure 12. If there is a thread from previous run, right click on it and then select Terminate and Remove.

rozario_12-1703147415780.png

Figure 12: Debug tab

Then click on OPTIGA_Cryptography Debug under Launches in the Quick Panel.

rozario_13-1703147445695.png

Figure 13: Options to run/debug the example

If you encounter any error message in the IDE, try the following steps:

  • First Clean the Application (Under Quick Panel)

rozario_14-1703147475602.png

 

Figure 14: Select clean OPTIGA_Cryptography

  • Now Build The project
  • After build is complete, click on OPTIGA_Cryptography Debug as shown in figure 13.

You will see the main.c file

For stepping over (F6) or stepping into a line of code (F5), you can either use function buttons or the IDE Step Over Button (red arrow), or Step into Button (blue arrow) as shown in figure 15.

rozario_15-1703147501979.png

Figure 15: Step into and step over options

You will see the messages in the terminal as you step over a message or printf line in the code.

By following these steps, you can try the other code examples present in ModusToolbox™. For more information on ModusToolbox™, refer the following link. For more information on OPTIGA™ Trust M, refer the following link.

If you have questions, please leave them below and we will gladly answer them!

237 Views
Authors