Main Content

Getting Started with Embedded Coder Support Package for Infineon AURIX TC3x Microcontrollers

This example shows how to use Embedded Coder® Support Package for Infineon® AURIX™ TC3x Microcontrollers to run a Simulink® model on Infineon AURIX TC3x board.

Introduction

Embedded Coder® Support Package for Infineon® AURIX™ TC3x Microcontrollers enables you to generate a real-time executable file and download it to your Infineon AURIX TC3x Microcontroller. The support package includes a library of Simulink blocks that you can use to configure and access Infineon AURIX TC3x Microcontrollers peripherals and communication interfaces.

In this example you will learn how to configure a simple Simulink model to generate code for Infineon AURIX TC3x and to run the generated code on the board to periodically turn an LED on and off in different patterns based on pressing a user button.

Supported Hardware

Infineon AURIX TC3x board

Required Software

Launch hardware setup and install the following third-party tools. For more information, see Supported Hardware and Required Software.

  • iLLD for TC3x family

  • TASKING VX-Toolset for TriCore

  • Infineon MemTool

Required Hardware

To run this example, you will need the following hardware:

  • Infineon AURIX TC375 Lite Kit

  • USB cable

Available Models

tc3x_2ledsBlinky

Simulink Model

This example demonstrates how to make an LED light blink in two patterns. The two patterns are controlled by an input switch, switch P00.7 connected to the board.

The different patterns can be observed on the two LEDs connected to the onboard (P00.5, P00.6). When the switch detects a leading edge, the output of the D Flip-Flop block toggles between 0 and 1.

The model generates Pattern 1, when the D flip-flop outputs 0 and Pattern 2 when it outputs 1.

  • Pattern 1: Both the LEDs blinks at a same time and turns off together.

  • Pattern 2: LEDs on the alternate pins blink.

Review Infineon Block Library

Embedded Coder Support Package for Infineon AURIX TC3x Microcontrollers enables you to create algorithms by using the blocks that you can add to your Simulink® model. The blocks are used to configure the associated sensors and actuators, as well as to read and write data to sensors and actuators.

1. Enter slLibraryBrowser at the MATLAB® prompt. This opens the Simulink Library Browser.

2. In the Simulink Library Browser, navigate to Embedded Coder Support Package for Infineon AURIX TC3x Microcontrollers > AURIX TC3x.

3. Double-click the Digital Port Read and Digital Port Write blocks. Review the block mask, which contains a description of the block and parameters for configuring the associated Infineon digital output pin.

Configure and Run the Model on Supported Infineon Hardware

In this task, you will configure and run your model on the supported Infineon AURIX™ board.

1. Connect the Infineon board to your computer with a USB cable.

2. In your Simulink model, press Ctrl+E or click Modeling > Model Settings to open Configuration Parameters dialog box.

3. Select the Hardware Implementation pane and select your required Infineon hardware from the Hardware board parameter list. Do not change any other settings.

5. Click OK.

Generate Code for Microcontroller

1. To generate the code for the model tc3x_2ledsBlinky, press Ctrl+B or click Build.

2. Follow the build process by opening the diagnostic viewer using the link provided at the bottom of the model canvas.

The support package includes a pre-configured model model that you can start off with.

Other Things to Try

  • Run the example in virtual platform (VP) environment. For more information on installation and set-up procedures for the VDK for IFX TC37x VP product family, refer to VDK for IFX TC37x VP Installation Guide.

  • Run the example on different Infineon AURIX TC3x Microcontrollers by changing the package class and pinout options and analyze the results.

More About