Skip to main content

Peripherals

Example

Supported kit

Description

KIT_XMC_PLT2GO_XMC4200

KIT_XMC43_RELAX_ECAT_V1

KIT_XMC_PLT2GO_XMC4400

KIT_XMC45_RELAX_V1

KIT_XMC47_RELAX_V1

KIT_XMC48_RELAX_ECAT_V1

KIT_XMC4400_DC_V1

Brownout Detection

This code example demonstrates brownout detection by reducing power supply voltage from 3.3 V to the defined voltage threshold using brownout detection available in XMC™ MCU devices. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CAN Loopback

This code example demonstrates the communication between two CAN nodes in loopback mode using XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CAN Receiver

This example demonstrates how to receive CAN messages over the CAN bus using XMC™ MCU. This example can be used together with the CAN Transmitter example running on another board. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CAN Transmitter

This example demonstrates how to transmit CAN messages over the CAN bus using XMC™ MCU. This example can be used with the CAN Receiver example running on another board. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU4 Capture

This code example demonstrates the capture features of the Capture and Compare Unit 4 (CCU4) slices available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU4 PWM

This code example demonstrates the use of CCU4 module in XMC™ MCU to create a PWM signal. The CCU4 slice is configured in monoshot mode and is restarted on an external start event. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU4 Timer

This code example demonstrates the usage of the Capture and Compare Unit 4 (CCU4) timer by blinking an LED using CCU4 timer period match interrupt available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU4 Timer Concatenation

This code example demonstrates the concatenation or linking feature of the Capture and Compare Unit 4 (CCU4) slices available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 Capture

This code example demonstrates the capture feature of Capture and Compare unit (CCU8) slices available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 PWM

This code example demonstrates how to generate PWM signals using Capture and Compare unit (CCU8) slices available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 PWM Complementary

This code example demonstrates generating two complementary pulse width modulated (PWM) waves using the Capture and Compare Unit(CCU8 module) available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 Timer

This code example demonstrates the usage of Capture-Compare Unit 8 (CCU8) in the XMC™ MCU in timer mode. The CCU8 timer slice program blinks an LED when a timer period match interrupt occurs. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 Timer Concatenation

This code example demonstrates the concatenation or linking feature of the Capture and Compare Unit 8 (CCU8) slices available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 Timer Synchronous Start

This code example demonstrates the synchronous start of Capture-Compare Unit 8 (CCU80 and CCU81) in the XMC™ MCU upon receving a trigger from the Event Request Unit (ERU). The CCU8 timer slice program blinks the on-board user LEDs (CCU80 blinks User LED1 and CCU81 blinks User LED2) when a timer period match interrupt occurs. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

CCU8 TRIGGERED VADC MEASUREMENT

This example demonstrates how to use CCU8 to trigger VADC in Infineon's XMC™ 1000/4000 devices. For more details, see the README on GitHub.

DAC Sine Wave

This code example demonstrates the usage of DAC peripheral of the XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

DMA FCE

This code example demonstrates how to use DMA to feed the Flexible CRC Engine (FCE) to calculate the CRC-32 on a fictitious frame of data in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

DMA GPIO

This code example demonstrates how to configure the GPIO registers using GPDMA. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

DMA M2M

This example demonstrates the transfer of data from the flash to the RAM using the GPDMA peripheral. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

DMA PWM

This code example demonstrates the use of DMA double buffering with the PWM block. DMA writes to the compare register of the PWM to obtain a varying duty cycle at the output. Two buffers are present to provide an increasing duty cycle in one and a decreasing duty cycle in the other. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

DMA Ring Buffer

This code example demonstrates how to receive data using DMA via a Universal Serial Interface Channel (USIC) and synchronize the processing with an OS task through a ring buffer. For simplicity, the OS task is emulated inside this example with a SysTick Timer interrupt. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

emUSB-Device HID Generic

This example demonstrates how to configure the USB block in a XMC™ 4000 MCU as a Human Interface Device (HID) using Segger's emUSB-Device middleware. The device enumerates as a Generic HID device. For more details, see the README on GitHub.

ERU EXTINT

This code example demonstrates Event Request Unit (ERU) functionality with external interrupt on XMC™ MCU evaluation kits. In this example, an external signal, fed into the ERU unit using a GPIO pin, triggers a service request interrupt that toggles an LED. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

ERU HIB IO

This code example demonstrates the routing of the hibernate pin state through the Event Request Unit (ERU) block when powered in hibernate domain for XMC™ MCU devices. For more details, see the README on GitHub.

FCE CRC

This code example uses the Flexible CRC Engine (FCE) driver for kernel to demonstrate CRC-32, CRC-16, and CRC-8 checksum calculations. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

Flash BMI

This example demonstrates how Boot Mode Index (BMI) can be used to configure a customized boot sequence on XMC™4700 device. Note: This code example involves programming the User Configuration Blocks (UCB), which can be programmed only a limited number of times. See the Design and Implementation section in the README before proceeding with this code example. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

Flash EEPROM

This code example shows how to use a portion of the internal flash memory of XMC™ MCUs as emulated EEPROM memory, and provides necessary APIs to perform read and write operations to the emulated EEPROM. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

Flash Program

This code example demonstrates how to erase a sector of the flash, write data to the sector and check the data for correctness on the XMC™ MCU device. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

Flash Protection

This example demonstrates how flash protection can be configured in the XMC™4000 Series of devices. Note: This code example involves programming the User Configuration Blocks (UCB), which can only be programmed only a limited number of times. See the Design and Implementation section in the README before proceeding with this code example. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

GPIO Toggle

This code example demonstrates GPIO toggling by periodically blinking an LED using SysTick available in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

HRPWM CSG

This example demonstrates how to use HRPWM comparator slope generator (CSG) module in Infineon's XMC™ 4000 devices. For more details, see the README on GitHub.

HRPWM HRC

This example demonstrates how to use HRPWM High Resolution Channel in Infineon's XMC™ 4000 devices. For more details, see the README on GitHub.

I2C Master and Slave

This code example demonstrates the implementation of an I2C master and an I2C slave on the same device based on the Universal Serial Interface Channel (USIC). The I2C master sends commands to the I2C slave to toggle the LEDs present on the XMC™ development kit. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

POSIF Hall

This code example demonstrates a position interface (POSIF) module in Hall sensor mode and uses the capture and compare unit 4 (CCU40) module to determine the speed of rotation of the motor. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

POSIF QD

This example demonstrates a Position Interface (POSIF) module in Quadrature Decoder (QD) mode and uses the CCU40 module to determine the speed of rotation of the encoder. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

RTC Alarm

This code example demonstrates an RTC alarm interrupt of 1 minute to set a periodically blinking LED on the XMC™ MCU Evaluation kits. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

SCU Hibernate

This code example demonstrates how to configure the SCU to enter Hiberante power mode and recover from hiberante to active power mode in XMC™ MCU devices. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

SCU Sleep

This code example demonstrates the System Control Unit (SCU) sleep mode on the XMC™ MCU evaluation kits. Wakeup is done by using an external interrupt via the Event Request Unit (ERU). An LED glows at every falling edge of the external signal inside the ERU interrupt. The MCU is put back to sleep mode again after servicing the interrupt. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

SPI DMA

This code example demonstrates how to use DMA driver to transfer data from RAM to SPI freeing the CPU for other tasks. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

SPI EXTTRG transmit

This example demonstrates the transfer of three bytes of data using the SPI master triggered by an external event or a timer-based event in XMC™ MCU. For more details, see the README on GitHub.

SPI Master

This code example demonstrates the transfer of 3 bytes of data using SPI Master in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

SPI QSPI Flash

This example demonstrates how the communication between the XMC™4700 (master) and the on-board QSPI flash chip N25Q03 (slave) takes place using the Quad SPI interface. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

UART DMA

This example demonstrates how to stream data using DMA via UART based on Universal Serial Interface Channel (USIC) to an external terminal. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

UART Printf

This example demonstrates how to use the printf function with a Universal Serial Interface Channel (USIC) based UART in XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

UART Shell

This code example demonstrates implementation of a shell on the UART communication interface including commands to toggle a LED using XMC™ MCU. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

UART Transmit

This code example demonstrates simple UART communication by printing periodic "Hello World!!" message on a terminal and blinking an LED. The message can be seen on a PC terminal. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

UART Transmit Receive FIFO Interrupts

This code example demonstrates how to use the Tx and Rx FIFO limit interrupts and send data from the Tx buffer to the Rx buffer. If reception is successful, the on-board LED 1 glows; otherwise, the LED remains OFF. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

VADC Background

This example demonstrates how to convert a single channel using the background source in VADC. In this example, the background source continuously requests conversion. The ADC conversion result is read and displayed on the UART Terminal. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

VADC EMUX

This code example demonstrates the VADC capability to drive a external multiplexer automatically by emux output pins in XMC™ MCU. For more details, see the README on GitHub.

VADC Queue

This example demonstrates how to convert multiple channels in a dedicated sequence using the queue source in VADC. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

VADC Scan

This code example demonstrates working of the Versatile Analog to Digital Converter (VADC) in the XMC™ MCU in continuous scan mode for one channel. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

WDT FEED

This code example demonstrates a Watchdog Timer (WDT) on the XMC™ MCU. The WDT needs to be fed every second for proper serving of the WDT. The SysTick timer is used to feed the WDT. When feeding occurs, the User LED blinks. If there is no feeding, the device goes into reset. After the reset, the MCU checks the reason for the last reset. If it is due to a failure to feed the WDT, the User LED blinks at a faster rate. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.

WDT Prewarning

This code example demonstrates the prewarning feature of the watchdog timer (WDT) on the XMC™ MCU evaluation kits. A pre-warning alarm is triggered before a watchdog reset only if the watchdog timer is not serviced properly. When a prewarning condition occurs, the User LED1 blinks once. After a watchdog reset, the MCU checks the reason for the last reset; if it was caused by a watchdog reset, the User LED2 blinks at a faster rate. For more details, see the README on GitHub. Note: Programming this code example requires installing SEGGER J-Link software.