Skip to main content

TRAVEO™ T2G code examples

Supported evaluation kits

KIT_T2G-B-H_EVK

KIT_T2G-B-H_LITE

Getting Started

Example

Supported KitDescription
KIT_T2G-B-H_EVKKIT_T2G-B-H_LITE

Empty App

This is a minimal starter application template for Infineon MCU devices. For more details, see the README on GitHub.

FreeRTOS Blinky

This code example demonstrates blinking LED functionality implemented by FreeRTOS tasks on the XMC7000 MCU devices. For more details, see the README on GitHub.

Hello World

This code example demonstrates a simple UART communication by printing a "Hello World" message on a terminal and blinking an LED using a timer resource. This code example is based on HAL (Hardware Abstraction Layer) libraries. For more details, see the README on GitHub.

Multicore Empty App

This empty application provides a multicore template for creating XMC7000 MCU applications. For more details, see the README on GitHub.

OTW Firmware Upgrade

This example demonstrates a firmware upgrade for the XMC7000 using the edge protect bootloader and DFU. For more details, see the README on GitHub.

Switching Power Modes

This example demonstrates how to transition XMC7000 MCU to the Active, Sleep, DeepSleep and Hibernate power states, and how to wake up and return to Active state. For more details, see the README on GitHub.

XMC7000 OOB Demo

This example is the out-of-the-box (OOB) demo project for the KIT_XMC72_EVK XMC7200 evaluation kit which includes - Hello world, PWM square-wave output, GPIO interrupt, SAR ADC basics, XMC™ MCU power modes, QSPI memory read/write, and CAN FD loopback code examples. For more details, see the README on GitHub.

Peripherals

Example

Supported KitDescription
KIT_T2G-B-H_EVKKIT_T2G-B-H_LITE

ADC basic

This example demonstrates use of the ADC (Analog to Digital Converter) HAL driver to perform voltage measurements in XMC7000 MCU. For more details, see the README on GitHub.

Asymmetric PWM Generation

This code example demonstrates the generation of asymmetric PWM signals using two compare/capture registers available in the TCPWM block of the XMC7000 MCU devices. For more details, see the README on GitHub.

CAN FD

This code example demonstrates how to use controller area network flexible data-rate (CAN FD) in XMC7000 MCU devices. In this example, the CAN Node-1 sends a CAN FD or standard frame to CAN Node-2 on pressing the user button and vice versa. Both the CAN nodes log the received data over UART serial terminal. Each time a CAN frame is received, the user LED toggles. For more details, see the README on GitHub.

Code Flash Sector Data Updating

This code example demonstrates the use of the Flash HAL driver to perform code flash Read/Write/Erase basic operate and update sector data online. The running steps logs on a UART terminal emulator. For more details, see the README on GitHub.

Cryptography AES Demonstration

This code example encrypts and decrypts user input data using the AES algorithm using a 128-bit key. The encrypted and decrypted data are displayed on a UART terminal emulator. For more details, see the README on GitHub.

Cryptography SHA Demonstration

This code example shows how to generate a 32-byte hash value or message digest for an arbitrary user input message with the SHA2 algorithm using the Cryptographic hardware block in the XMC7000 MCU. For more details, see the README on GitHub.

Cryptography TRNG Demonstration

This code example demonstrates how to generate a one-time password (OTP) of eight characters in length with the true random number generation feature using the cryptographic hardware block in MCU. For more details, see the README on GitHub.

Emulated EEPROM

This code example demonstrates emulation of EEPROM behavior in flash memory of XMC7000 MCU using emeeprom middleware. For more details, see the README on GitHub.

Ethernet Secure TCP Client

This code example demonstrates implementation of a secure TCP client with XMC7000 MCU. In this example, a TCP client establishes a secure connection with a TCP server through an SSL handshake. Once the SSL handshake completes successfully, the TCP client turns ON or OFF the user LED based on the command received from the TCP server. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

Ethernet Secure TCP Server

This code example demonstrates implementation of a secure TCP Server with XMC7000 MCU. In this example, the TCP server establishes a secure connection with a TCP client through SSL handshake. Once the SSL handshake completes successfully, the server allows the user to send LED ON/OFF command to the TCP client; the client responds by sending an acknowledgement message to the server. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

Ethernet TCP Client

This code example demonstrates implementation of TCP client with XMC7000 MCU. The example establishes a connection with a remote TCP server and based on the command received from the TCP server, turns the user LED ON or OFF. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

Ethernet TCP Server

This code example demonstrates implementation of a TCP server with XMC7000 MCU. In this example, the TCP server establishes a connection with a TCP client. Once the connection completes successfully, the server allows the user to send LED ON/OFF command to the TCP client, and the client responds by sending an acknowledgment message to the server. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

Ethernet UDP Client

This code example demonstrates implementation of UDP client with XMC7000 MCU. The example establishes a connection with a remote UDP server and turns the user LED ON or OFF based on the command received from the UDP server. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

Ethernet UDP Server

This code example demonstrates implementation of UDP Server with XMC7000 MCU. In this example, the UDP server waits for the UDP client to establish a connection. Once a connection is established, the server allows the user to send the LED ON/OFF command to the UDP client through a button press; the client responds by sending an acknowledgement message to the server. For more details, see the README on GitHub. License Disclaimer: This code example makes use of the lwIP open-source TCP/IP stack. Creating a project from this template will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license. Creating a project from this template will cause Mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the Mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

EVTGEN trigger ADC

This code example demonstrates how to use the XMC7000 MCU event generator (EVTGEN) resource to trigger ADC conversion in active power mode. For more details, see the README on GitHub.

Fault Handling

This example demonstrates the fault handling functionality of XMC7000 MCU using Peripheral Driver Library (PDL) System Library (SysLib). For more details, see the README on GitHub.

GPIO Pins

This example demonstrates the GPIO pin operation on the XMC7000 MCU, using Eclipse IDE for ModusToolbox™. This includes reading, writing, interrupts, and full port configurations. For more details, see the README on GitHub.

HAL GPIO Interrupt

This example demonstrates the use of a GPIO configured as an input pin to generate interrupts on an Infineon MCU. For more details, see the README on GitHub.

HAL I2C Master

This example demonstrates the use of I2C (HAL) resource in Master mode. The I2C master is configured to send command packets to control a user LED on the slave. For more details, see the README on GitHub.

HAL I2C Slave

This code example demonstrates the use of I2C resource in HAL in slave mode. The I2C slave is configured to receive command packets to control a user LED on the kit. For more details, see the README on GitHub.

HAL PWM Square Wave

This code example generates a square wave using the PWM driver. An LED connected to the PWM output pin blinks at 2 Hz. For more details, see the README on GitHub.

HAL SPI Master

This example demonstrates the use of SPI (HAL) resource in Master mode. The SPI master is configured to send command packets to control a user LED on the slave. For more details, see the README on GitHub.

HAL SPI Slave

This code example demonstrates the use of SPI (HAL) resource in Slave mode. The SPI slave is configured to receive command packets to control a user LED on the kit. For more details, see the README on GitHub.

HAL TCPWM Timer

This code example generates an interrupt every second with the timer driver, and toggles the user LED when a timer interrupt is generated. For more details, see the README on GitHub.

HAL Watchdog Timer

This example explains how to set up a Watchdog Timer (WDT) using the WDT HAL resource. The WDT resets the device if it is not serviced or "kicked" within the configured timeout interval. For more details, see the README on GitHub.

I2C Master EzI2C Slave

This example demonstrates the use of I2C (HAL) resource in Master mode with an EzI2C slave. The I2C master is configured to send command packets to control a user LED on the slave. Both the slave and the master can be configured on the same kit. For more details, see the README on GitHub.

I2C Slave Using Callbacks

This example demonstrates the operation of the I2C (HAL) resource in Slave mode using callbacks. For more details, see the README on GitHub.

Low-Power Wakeup from RTC Alarm

This code example demonstrates XMC7000 MCU how to enter the DeepSleep and Hibernate mode, and wake-up using the RTC alarm. For more details, see the README on GitHub.

LVD Interrupt

This code example shows how to configure low-voltage detection (LVD) in XMC7000 MCU to monitor VDDD and generate an interrupt when VDDD drops below the configured threshold. For more details, see the README on GitHub.

MCWDT Interrupt

This example shows how to configure XMC7000 MCWDT Subcounter0/1 and Subcounter2 operation with interrupt. For more details, see the README on GitHub.

Multicore IPC Pipes

This example demonstrates how to use the inter-processor communication (IPC) driver to implement a message pipe in XMC7000 MCU. The pipe is used to send messages between CPUs. For more details, see the README on GitHub.

RTC Basics

This example demonstrates the usage of the real-time clock (RTC) in Infineon MCU. It shows how to get and set the time in the RTC using the RTC HAL API. For more details, see the README on GitHub.

SCB SPI Master DMA

This example demonstrates the use of the SPI Serial Communication Block (SCB) resource for XMC7000 MCU in master and slave mode using DMA. For more details, see the README on GitHub.

SCB UART Transmit and Receive using DMA

This example demonstrates the UART transmit and receive operation using DMA in XMC7000 MCU. For more details, see the README on GitHub.

Smart IO with GPIO

This example uses the smart I/O peripheral in XMC7000 MCU to connect the button input pin to an output pin to toggle an external LED. There is no CPU usage except for the initialization of GPIO and smart I/O. For more details, see the README on GitHub.

TCPWM Counter

This code example demonstrates how to use the tcpwm counter on the XMC7000 MCU. The counter is started by pwm signal and work with 200KHz clock frequency. Enable the counter CC0 match interrupt, when counter up to CC0 match value generates the interrupt to toggle user LED. For more details, see the README on GitHub.

TCPWM Dead Time Mode

This code example shows TCPWM dead-time mode function. PWM line and PWM COMPL pins output the 1-kHz frequency wave and 1-kHz frequency wave with PWM leftalign 250 us in PWM dead-time mode. For more details, see the README on GitHub.

Toggle LED with SysTick Timer

This code example demonstrates how to use the SysTick timer to generate a timer interrupt on XMC7000 MCU. For more details, see the README on GitHub.

UART Transmit and Receive

This example demonstrates the UART (HAL) transmit and receive operation in an Infineon MCU. For more details, see the README on GitHub.

Additional Code Examples

Example

Supported KitDescription
KIT_T2G-B-H_EVKKIT_T2G-B-H_LITE

ADC 3CHs simultaneous conversion using TCPWM

This code example demonstrates how to convert multiple SAR ADC (Successive Approximation Register Analog-to-Digital Converter) channels simultaneously by triggering the TCPWM (Timer, Counter and PWM) counter. In this example, three SAR-ADC channels ADC[0]_0, ADC[1]_0 and ADC[2]_0 are configured to get trigger from the TCPWM counter. The trigger from the TCPWM counter is connected in parallel to the SAR sequencer of each channel using trigger multiplexer. All the ADC conversion of each channel will start simultaneously as soon as the counter reaches its terminal count. For more details, see the README on GitHub.

ADC basic

This code example demonstrates the use of the ADC HAL driver to perform voltage measurements. In this example, the driver is configured to sample the input voltage periodically and display the sampled voltage on the UART terminal. By default, the ADC is configured to use one channel in single-ended mode. For more details, see the README on GitHub.

ADC Calibration

This code example demonstrates the ADC calibration algorithm. In this example, the ADC calibration algorithm is executed to find an optimal offset and gain compensation for the ADC. It is also providing the options for decalibration by setting different offset and gain values (boundary values) which result in a decalibrated analog-to-digital transfer curve. A single ADC conversion is showing the voltage level of a potentiometer output while the calibration is done on a different logical ADC channel. For more details, see the README on GitHub.

ADC Conversion Result Processing

This code example shows how the conversion results of the SAR ADC change depending on the various conversion output methods. In this example, the results of various ADC conversion output methods (Averaging, Alignment, Sign Extension) are executed. The KIT potentiometer is set as the ADC input and the conversion is performed. The results are sent to the terminal each time according to the user's input, which includes the average count and the output format. For more details, see the README on GitHub.

ADC Diagnostic Reference Conversion

This code example demonstrates the usage of the diagnostic reference for debugging the functionality of the on-chip ADC (Analog-to-Digital Converter) module. In this example, the diagnostic reference module is used to provide a known voltage as an input to the ADC module. The purpose of this setup is to test the ADC's functionality. The output count of the ADC is converted to equivalent voltage. The ADC is working correctly, if the measured voltage matches the input voltage within an acceptable margin of error. For more details, see the README on GitHub.

ADC Pulse Detection

This code example illustrates the functionality of the SAR ADC module's pulse detection feature. This feature relies on ADC range detection and serves the purpose of monitoring whether the converted ADC voltage result falls within the specified range while considering a filtering function. In this example, we configure the ADC pulse detection feature to trigger an interrupt whenever the ADC input voltage deviates beyond the threshold voltages set by the user. Unlike the standard ADC range detection mode, we incorporate a hardware reload counter to tally the range detection events. The interrupt callback function is executed only when a certain number of predefined events are detected. To provide the input voltage level to the chosen ADC channel, we utilize an onboard potentiometer. Alternatively, an external waveform generator can be employed to supply an appropriate ADC input signal. Whenever the ADC input voltage deviates from the specified range for the predefined reload counter value, the configured GPIO pin gives a momentary HIGH signal. The primary purpose of the pulse detection feature is to filter out glitches or noise from the observed analog signal, among other potential applications. For more details, see the README on GitHub.

ADC Range Detection

This code example demonstrates the ADC range detection feature of the SAR ADC module. This feature is useful to monitor whether the converted result of ADC voltage is within the required range. In this example, the ADC range detection feature is configured to trigger an interrupt whenever the ADC output voltage goes out of the range marked by user-selected threshold voltages. The onboard potentiometer is used to provide input voltage level to the selected ADC channel. Optionally, an external waveform generator can be used to provide an adequate ADC input signal. The onboard USER_LED is switched on whenever the ADC input voltage goes out of range. For more details, see the README on GitHub.

AUDIOSS I2S Sound Play using DMA

This code example shows how to play the sound of WAV format via I2S functionality of AUDIO Subsystem using P-DMA. TRAVEO™ T2G MCUs have an Audio Subsystem that can establish a serial bus interface used to connect digital audio device together. This CE transmits a WAV sound source prepared in Code Flash via standard I2S bus. In addition, the sound can be played without any CPU load since the CPU only used to input a trigger to start playing the sound and the sound data transmission is done automatically by P-DMA. For more details, see the README on GitHub.

CAN FD

This code example demonstrates how to use controller area network flexible data-rate (CAN FD) in TRAVEO™ T2G MCU devices. In this example, the CAN Node-1 sends a CAN FD or standard frame to CAN Node-2 on pressing the user button and vice versa. Both the CAN nodes log the received data over UART serial terminal. Each time a CAN frame is received, the user LED toggles. For more details, see the README on GitHub.

Clock External Output

This code example demonstrates how to use the clock output feature which routes clock CLK_HF3 to an external pin. In this example a pin will be configured to output the clock CLK_HF3. The user will be able to change the frequency of CLK_HF3 during runtime. In a real application this feature can be used for supplying external components with a clock signal or for diagnostic/debugging purposes like monitoring an internal clock signal on a port pin. For more details, see the README on GitHub.

CRYPTO Performance Measurement

This code example shows the performance differences of crypto hardware block and the one that is performed by CPU. The result should be printed to the terminal along with the approximate time taken for each method. In this example, the performance is analyzed while generating a 32-byte hash value or message digest for a given data with the SHA256 algorithm using the Cryptographic hardware block in the MCU. The cipher procedure on CPU is done by MbedTLS library. For more details, see the README on GitHub.

EVTGEN trigger ADC

This code example demonstrates how to use the TRAVEO™ T2G MCU event generator (EVTGEN) resource to trigger ADC conversion in active power mode. In this example, the event generator is configured to trigger an ADC conversion every second, and when ADC conversion is complete, print out the ADC result via UART. For more details, see the README on GitHub.

FAULT REPORT Configuration

This code example shows how to configure the fault subsystem and describes its operation. In this example, a correctable error correction code (ECC) error is injected into the memory, causing a fault. For more details, see the README on GitHub.

FLASH Dual Bank Switching

This code example shows how to switch the bank configuration of flash memory. TRAVEO™ T2G MCUs have a Dual Bank mode in Code and Data Flash memory, where the area is divided into two banks in addition to the Single Bank mode used for normal mapping. In Dual Bank mode, either logical bank 0 or 1 can be the active bank and the other side becomes the inactive bank by performing bank switching. This feature allows for quick activation of the new firmware and rollback to the old firmware after a firmware rewrite via OTA (Over-The-Air). In addition, the new firmware can be written to the inactive bank while the application is running in the active bank, significantly reducing system downtime. This CE shows how to switch the bank mode on code flash memory. For more details, see the README on GitHub.

FLASH ECC Injection

This code example demonstrates the usage of the ECC error injection feature to test the functionality of Flash Error Correcting Code (ECC). In this example, the ECC error injection mechanism is used to inject an error into the target Code Flash address. When the target address is read, the flash controller's ECC logic triggers a fault through the central fault sub-system, indicating the error. In case of non-correctable errors, a bus error is returned to the requester in addition. The faults are then handled, and the fault information is displayed. This example demonstrates Single Error Correction and Double Error Detection (SECDED). For more details, see the README on GitHub.

GPIO Pins

This example demonstrates the GPIO pin operation on the TRAVEO™ T2G body high MCU, using Eclipse IDE for ModusToolbox™. This includes reading, writing, interrupts, and full configuration. For more details, see the README on GitHub.

INTERRUPT NMI Timing Protection

This code example demonstrates the Timing Protection configuration using Non Maskable Interrupt (NMI), shows its operation, initial setting, and interrupt handling. In this example, the Interrupt Service Routine (ISR) processing time is protected. If the processing time limit is exceeded, an NMI is generated and appropriate action can be taken. For more details, see the README on GitHub.

INTERRUPT Software Interrupt

This code example shows how to generate software interrupts and describes their operation, initialization, and interrupt handling. In this example, software is used to generate an indirect interrupt, by setting the interrupt bit of a timer peripheral. For more details, see the README on GitHub.

M-DMA Memorycopy

This code example demonstrates the transmission of data from memory to memory by Memory DMA (M-DMA), shows its operation, initial setting, and interrupt handling. This code example demonstrates the transmission of data from Code Flash to SRAM by M-DMA. M-DMA transfer is initiated using software triggers. For more details, see the README on GitHub.

M-DMA Scatter Transfer

This code example demonstrates how to use the scatter functionality of the M-DMA block. This example shows a memory transfer via Memory Direct Memory Access (M-DMA) in scatter mode, which allows to transfer data to multiple locations in memory in one transfer. For this, the source data must be specified in a specific way. In a real application, this can be used to write many configuration values into registers scattered around in memory in one transfer. M-DMA handles these transfers without CPU involvement. For more details, see the README on GitHub.

P-DMA 2D Transfer

This code example demonstrates the transmission of data by Peripheral Direct Memory Access (P-DMA) 2D Transfer, shows its operation, initial setting, and interrupt handling. This code example demonstrates the transmission of data by P-DMA with 2D-Transfer. For more details, see the README on GitHub.

P-DMA ECC Injection

This code example demonstrates the usage of the ECC error injection feature to test the functionality of the ECC logic for the P-DMA channel configuration SRAM memory. In this example, the ECC error injection mechanism is used to inject an error into the target P-DMA channel's SRAM word. When the target address is read, the P-DMA ECC logic triggers a fault through the central fault sub-system, indicating the error. The faults are then handled, and the fault information is displayed. This example demonstrates Single Error Correction and Double Error Detection (SECDED). For more details, see the README on GitHub.

PROT CPU MPU Configuration

This code example shows how to configure the Memory Protection Unit (MPU), which is part of the CPU, and describes its operation and initial settings. In this example, the memory is split in different regions and protected. When a protected region is tried to access, an exception is raised. For more details, see the README on GitHub.

PROT PPU Configuration

This code example shows how to configure the PPU (Peripheral Protection Unit) and describes its operation and initial settings. In this example, the PPU is used for protection. If access violation is detected, a fault is generated. For more details, see the README on GitHub.

PROT PPU ECC Injection

This code example shows how to perform the error injection onto Error Correcting Code (ECC) of Peripheral Protection Unit (PPU). The static random- access memory (SRAM) stored protection information of PPU is supported by ECC. This ECC supports single error correction and double error detection (SECDED). In this example, an ECC error is injected into the SRAM that contains PPU configuration. For more details, see the README on GitHub.

PROT SMPU Configuration

This code example shows how to configure the SMPU (Shared Memory Protection Unit) and describes its operation and initial settings. In this example, the SMPU is used for protection. If access violation is detected, a fault is generated. For more details, see the README on GitHub.

RAM Retention after External Reset

This code example checks RAM Retention mode after External Reset occurs. The TRAVEO™ T2G MCU has a retention function for SRAM, but after an external reset using the XRES_L pin occurs, the SRAM values cannot be retained correctly because the write buffer of the SRAM is not subject to retention. This example shows how to retain the SRAM value even after the MCU is reset by an external device. For more details, see the README on GitHub.

RAM Retention in DeepSleep Power Mode

This code example demonstrates how to set RAM into Retention mode before entering DeepSleep mode. TRAVEO™ T2G MCUs provides the Static RAM (SRAM) Retention function in DeepSleep mode. This code example writes known data into SRAM Controller 1 and sets the SRAM into Retention mode before entering DeepSleep mode. After wakeup from DeepSleep mode, data written to SRAM Controller 1 is read back and compared to the data written before entering DeepSleep mode to check if the data is retained. For more details, see the README on GitHub.

REGHC Pass Transistor Configuration

This code example demonstrates how to switch and configure to an external Pass Transistor. This code example demonstrates how to switch the power supply source between an internal regulator (LDO) and an external pass transistor. It also shows enter and wake up from DeepSleep mode when the external pass transistor is used. For more details, see the README on GitHub.

RTC Basics

This example demonstrates the usage of the real-time clock (RTC) in Infineon MCU. It shows how to get and set the time in the RTC using the RTC HAL API. For more details, see the README on GitHub.

SCB SPI Master DMA

This example demonstrates the use of the SPI serial communication block (SCB) resource for Infineon MCU in master and slave mode using DMA. The SPI master is configured to send command packets to control a user LED on the slave. Both the master and slave can be on the same device or on different devices. For more details, see the README on GitHub.

SECURE boot

This code example demonstrates how to configure the firmware to Secure Boot. In this CE, the TRAVEO™ T2G MCU's Flash Boot, which is first verified by BootROM and guaranteed secure, verifies the CM0+ firmware. After booting, the CM0+ firmware verifies the CM7_0/1 firmware and enables them only if the signatures match. For more details, see the README on GitHub.

SECURE PPU Enhanced Security

This code example shows how to configure a PPU enhanced security. The PPU (Peripheral Protection Unit) is one of the protection features of the TRAVEO™ T2G MCU. This CE shows how to enhance security by adding a PPU configuration to TOC2 in SFlash and enabling it by flash boot and HSM (Hardware Security Module) software (= CM0+ firmware). This operation can enhance the security of the HSM software. Note that to ensure the security HSM software should be securely booted using secure boot mechanism of the TRAVEO™ T2G MCU, but this CE does not implement that since it focuses to the security enhancement feature. To see how to implement the secure boot mechanism, refer to another CE SECURE boot. For more details, see the README on GitHub.

SECURE SWPU App Protection

This code example shows how to configure user application protection using a SWPU (SoftWare Protection Unit). The SWPU of the TRAVEO™ T2G MCU consists of the FWPU (Flash Write Protection Unit), ERPU (eFuse Read Protection Unit), and EWPU (eFuse Write Protection Unit) to protect the protection target from access by the user application. This CE configures the FWPU to protect the write/erase access to the Code Flash from each CM7 cores. For more details, see the README on GitHub.

SMART IO Glitch Filter

This code example shows how to configure the glitch filter using Smart I/O functionality. In this example, glitch signal is connected to Smart I/O to filter the glitch and provide a filtered output signal. No CPU load is required to perform the filtering, except for initialization of general- purpose input/output (GPIO) and Smart I/O. For more details, see the README on GitHub.

Smart IO with GPIO

This example uses the smart I/O peripheral in TRAVEO™ T2G MCU to connect the button input pin to an output pin to toggle an external LED. There is no CPU usage except for the initialization of GPIO and smart I/O. For more details, see the README on GitHub.

SMIF QSPI Flash Read Write

This example demonstrates interfacing with an external NOR flash memory in Quad SPI (QSPI) mode using the serial memory interface (SMIF) in Infineon MCU. This code example configures the QSPI flash memory mounted on the board with the QSPI Configurator and accesses it via the serial-flash library. For more details, see the README on GitHub.

TCPWM Asymmetric PWM Generation

This code example demonstrates the generation of asymmetric PWM signals using two compare/capture registers available in the Timer, Counter and PWM (TCPWM) block. Compared to the asymmetric PWM realized with only one compare function (where the CPU is used to update the compare value twice every PWM cycle), this solution uses two independent buffered compare values and causes less load on the CPU (where the CPU is used to update the compare value once every PWM cycle). PWM waveform can be modified through the command on the terminal. For more details, see the README on GitHub.

TCPWM Capture

This code example shows how to configure the capture function using TCPWM (Timer, Counter and Pulse Width Modulator) block and describes its operation and initial settings. The example configures TCPWM (Timer, Counter and Pulse Width Modulator) as the Counter mode with User button (USER_BTN) as input. The button is used as start, reload and stop trigger. In addition, the rising edge made by the button release will be captured by the counter. For more details, see the README on GitHub.

TCPWM Counter

This code example demonstrates how to use the tcpwm counter on the TRAVEO™ T2G MCU. The counter is started by pwm signal and work with 200KHz clock frequency. Enable the counter CC0 match interrupt, when counter up to CC0 match value generates the interrupt to toggle user LED. For more details, see the README on GitHub.

TCPWM Dead Time Mode

This code example shows TCPWM dead-time mode function. PWM line and PWM COMPL pins output the 1-kHz frequency wave and 1-kHz frequency wave with PWM leftalign 250 us in PWM dead-time mode For more details, see the README on GitHub.

TCPWM Shift Register Mode

This code example demonstrates the delayed signal generation using Shift Register (SR) mode. The SR functionality shifts the counter value in the right direction. The capture0 input is used to generate the MSB of the next counter value. The line output signal is driven from a programmable tab of the counter. In this example, the capture0 is assigned to the user button of the kit and the line output is assigned to the user LED of the kit as well, so the LED will light up about 0.5s later from the press of the button. For more details, see the README on GitHub.

TCPWM Simultaneous Startup

This code example demonstrates how to trigger multiple TCPWM (Timer, Counter and PWM) channels simultaneously by software. In this example, the LED-A and LED-B on the target board connected to the PWM output pin and blink at the rate of 2Hz with different duty cycles. These PWMs are made by TCPWM (Timer, Counter, and PWM) and simultaneously activated by software via Trigger Multiplexer. For more details, see the README on GitHub.

Toggle LED with SysTick Timer

This code example demonstrates how to use the SysTick timer to generate a timer interrupt on TRAVEO™ T2G MCU. The user LED is toggled when 10 SysTick timer interrupts are generated. For more details, see the README on GitHub.

Trigger Multiplexer TRIG_DBG signal

This code example demonstrates the usage of the TRIG_DBG signal at a port pin as a means for debugging on-chip trigger activity. In this example, one of the trigger outputs of a Timer Counter Pulse Width Modulation (TCPWM) HW module is observable at a port pin using the Trigger Multiplexer HSIOM_IO_OUTPUT trigger output and TRIG_DBG port function. In a real application this could be used for debugging purposes to check the occurrence of trigger events or their temporal relationship to other signals. For more details, see the README on GitHub.

Advanced Solutions

Example

Supported KitDescription
KIT_T2G-B-H_EVKKIT_T2G-B-H_LITE

AWS IoT OTA Dualbank

This code example uses a TRAVEO™ T2G MCU to run the OTA function of the AWS IoT Cloud via Ethernet using MQTT over TLS. It also adopts Dual Bank Flash to enable fast activation/roll-back between old and new firmware, Secure Boot feature to ensure the security of the firmware and Crypto hardware which accelerates the crypto operation. For more details, see the README on GitHub.