You are here

PSoC 6 MCU Code Examples for ModusToolbox Software | サイプレス セミコンダクタ

PSoC 6 MCU Code Examples for ModusToolbox Software

最終更新日: 
2020 年 11 月 19 日

These examples focus on and demonstrate the capabilities of the PSoC 6 MCU and its peripherals, as well as ModusToolbox middleware. Links take you to a GitHub repository where you can review the ReadMe file for full details on each example, including supported kits.

Use the ModusToolbox IDE New Application wizard to create these examples. You can also use the ModusToolbox stand-alone Project Creator tool, or the command line, to create a folder that contains all the files. You can use this project folder in another IDE.

See other ModusToolbox Software code examples.

タイトル 説明
mtb-example-psoc6-empty-app This empty application provides a template for creating applications using PSoC 6 devices.
mtb-example-psoc6-hello-world Demonstrates simple UART communication by printing a "Hello World" message on a terminal and blinks an LED using a Timer resource.
mtb-example-psoc6-ble-findme This code example demonstrates the implementation of a simple BLE Immediate Alert Service(IAS)-based Find Me Profile (FMP) using PSoC 6 MCU with Bluetooth Low Energy (BLE) Connectivity (PSoC 6 BLE).
mtb-example-psoc6-ble-battery-level-freertos This code example demonstrates the implementation of a BLE Battery Service using PSoC 6 MCU with Bluetooth Low Energy Connectivity (PSoC 6 BLE). This code example implements a GATT Server with the Battery Service and Device Information Service BLE standards. This code example uses FreeRTOS.
mtb-example-psoc6-capsense-buttons-slider Uses a 5-segment CapSense slider and two CapSense buttons to control an LED.
mtb-example-psoc6-capsense-buttons-slider-freertos This code example features a 5-segment CapSense slider and two CapSense buttons. The code example also demonstrates interfacing with Tuner GUI using I2C interface.
mtb-example-psoc6-switching-power-modes This example demonstrates how to transition PSoC 6 MCU to the following power modes - Low Power Active, Low Power Sleep, Ultra Low Power Active, Ultra Low Power Sleep, and Deep Sleep.
mtb-example-psoc6-gpio-interrupt This example demonstrates how to configure a GPIO to generate an interrupt in PSoC 6 MCU.
mtb-example-psoc6-wdt This example explains two use cases of Watchdog Timer (WDT) – a watchdog that causes a device reset in the case of a malfunction and as a periodic interrupt source.
mtb-example-psoc6-mcwdt This example explains how to set up a 32-bit free-running counter using two 16-bit counters of the Multi-Counter Watchdog Timer (MCWDT) on PSoC® 6 MCU.
mtb-example-psoc6-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.
mtb-example-psoc6-smartio-ramping-led This example uses a PWM resource and Smart I/O in PSoC 6 MCU to implement a ramping LED, where an LED gradually cycles through increasing and decreasing brightness levels. There is no CPU usage except for the initialization of PWM and Smart I/O.
mtb-example-psoc6-rtc-basics This example demonstrates the usage of the real-time clock (RTC) in PSoC6 MCU. It shows how to get and set the time in the RTC using the RTC HAL API. The example also supports DST feature.
mtb-example-psoc6-fault-handling This example demonstrates the fault handling functionality of PSoC 6 MCU using Peripheral Driver Library (PDL) System Library (SysLib) and ModusToolbox integrated development environment (IDE).
mtb-example-psoc6-emulated-eeprom This code example demonstrates emulation of EEPROM behavior in flash memory of PSoC 6 MCU using emeeprom middleware.
mtb-example-psoc6-qspi-readwrite This example demonstrates interfacing with an external NOR flash memory in Quad-SPI mode using the Serial Memory Interface (SMIF) block in PSoC® 6 MCU.
mtb-example-psoc6-qspi-readwrite-sfdp This example demonstrates interfacing with an external NOR flash memory in Quad-SPI mode using the Serial Memory Interface (SMIF) block in PSoC® 6 MCU.

This example uses the Serial Flash Discoverable Parameters (SFDP) standard to auto-discover the flash parameters and the commands for read, program, and erase operations.
mtb-example-psoc6-emwin-eink-freertos This example demonstrates displaying 2D graphics on an E-INK display using the EmWin graphics library in FreeRTOS.
mtb-example-psoc6-emwin-oled-freertos This example demonstrates displaying 2D graphics on an OLED display using the EmWin graphics library in FreeRTOS.
mtb-example-psoc6-uart-transmit-receive This example demonstrates the UART (HAL) transmit and receive operation in PSoC 6 MCU.
mtb-example-psoc6-uart-transmit-receive-dma This example demonstrates the UART transmit and receive operation using DMA in PSoC 6 MCU.
mtb-example-psoc6-usb-hid-mouse This example demonstrates how to configurethe USB block in a PSoC 6 MCU as a Human Interface Device (HID). The device enumerates as a 3-button mouse.
mtb-example-psoc6-usb-cdc-echo This example demonstrates how to configure the USB block in a PSoC 6 MCU for Communication Device Class (CDC). When configured for a CDC, the PSoC 6 enumerates a Virtual COM port, which can be read and written by a terminal emulator program on PC.
mtb-example-psoc6-i2c-master This example demonstrates the use of I2C (HAL) resource for PSoC 6 MCU in Master mode.
mtb-example-psoc6-i2c-slave-callback This example demonstrates the operation of the I2C (HAL) resource for PSoC 6 MCU in Slave mode using callbacks
mtb-example-psoc6-i2c-master-ezi2c-slave This example demonstrates the use of PSoC 6 MCU Serial Communication Block (SCB) resource in I2C Master mode with EzI2C slave.
mtb-example-psoc6-i2s This example demonstrates how to use the I2S hardware block in PSoC 6 MCU to interface with an audio codec.
mtb-example-psoc6-spi-master This example demonstrates the use of SPI (HAL) resource for PSoC 6 MCU in Master mode.
mtb-example-psoc6-spi-master-dma This example demonstrates the use of PSoC 6 MCU Serial Communication Block (SCB) resource in SPI Master mode using DMA.
mtb-example-psoc6-pdm-pcm This example demonstrates how to use the pulse-density modulation/pulse-code modulation (PDM/PCM) hardware block in PSoC 6 MCU with a digital microphone.
mtb-example-psoc6-pdm-to-i2s This example demonstrates how to route Pulse-Density Modulation (PDM) audio data to the Inter-IC Sound (I2S) Interface in PSoC 6 MCU.
mtb-example-psoc6-crypto-trng This example demonstrates generating a one-time password (OTP) of eight characters in length using the TRNG block of PSoC 6 MCU.
mtb-example-psoc6-crypto-sha 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 PSoC 6 MCU.
mtb-example-psoc6-crypto-aes 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.
mtb-example-connectivity-secure-tcp-server This code example demonstrates implementation of a secure TCP server with PSoC 6 MCU and CYW43012/CYW4343W connectivity device. The TCP server receives the message "Hello ModusToolbox" sent from the TCP client.
mtb-example-connectivity-secure-tcp-client This code example demonstrates implementation of secure TCP client with PSoC 6 MCU and CYW43012 connectivity device. The example establishes a secure connection with a remote TCP server and sends the LED ON/OFF status to the remote TCP server.
mtb-example-connectivity-tcp-client This code example demonstrates implementation of TCP client with PSoC 6 MCU and CYW43012 connectivity device. The example establishes a connection with a remote TCP server and sends the LED ON/OFF status to the remote TCP server.
mtb-example-psoc6-usb-audio-recorder This example demonstrates the use of PSoC 6 MCU to implement an audio recorder using the USB Audio Device Class.
mtb-example-psoc6-usb-hid-generic This example demonstrates how to configure the USB HID descriptor to transfer any type of data. After the device enumerates, the User LED turns on. In the main loop, firmware waits to receive data from the host, and sends back the same data.
mtb-example-psoc6-usb-msc-logger This example demonstrates how to configure the USB block in a PSoC 6 MCU as a Mass Storage (MSC) device and emulate a file system in the SRAM memory.
mtb-example-psoc6-csdadc This example demonstrates the usage of CSD analog-to-digital converter (ADC) in PSoC6 MCU. CSDADC measures the external voltage and displays the conversion result the terminal application.
mtb-example-psoc6-usb-audio-device-freertos This example demonstrates how to use PSoC 6 MCU to implement a USB Audio Device and HID Audio Playback Control that connects to the PC via the USB interface. The example also uses FreeRTOS.
mtb-example-psoc6-usb-msc-file-system This example demonstrates how to configure the USB block in a PSoC 6 MCU as a Mass Storage (MSC) device and run a file system (FatFS) through an external memory (microSD). This example uses FreeRTOS.
mtb-example-psoc6-capsense-custom-scan This code example demonstrates CapSense® custom scanning through CapSense Middleware's callback functions that allow altering the sensor parameters during runtime or synchronizing the CapSense scan with non-CapSense operations. In this code example, the callback function is used to change the inactive sensor state to either shield or ground depending on the sensor being scanned.
mtb-example-psoc6-dual-cpu-empty-app This is a minimal starter Dual-CPU application template for PSoC 6 MCU devices.
mtb-example-psoc6-ble-capsense-tuner-server This code example demonstrates how to monitor the CapSense® data and tune the CapSense sensors over BLE communication with CapSense Tuner GUI using PSoC® 6 BLE MCU. This example is intended to be used with the Tuning CapSense over BLE – Client example
mtb-example-psoc6-ble-capsense-tuner-client This code example demonstrates how to monitor the CapSense® data and tune the CapSense sensors over BLE communication with CapSense Tuner GUI using PSoC® 6 BLE MCU. This example is intended to be used with the Tuning CapSense over BLE – Server example
mtb-example-psoc6-mcuboot-basic This code example demonstrates building a simple bootloader application for PSoC 62/63 MCUs using the open-source library - MCUboot.
mtb-example-psoc6-qspi-xip This example demonstrates how to use QSPI block of the PSoC 6 MCU in execute-in-place (XIP) mode with an external flash memory device using Eclipse IDE for ModusToolbox
mtb-example-psoc6-low-power-sar-adc-thermistor-als This example demonstrates low-power sensing of a thermistor and ambient light sensor (ALS) using the SAR ADC of PSoC® 6 MCU.
mbed-os-example-csdadc This example demonstrates the usage of CSD analog-to-digital converter (ADC) in PSoC6 MCU. CSDADC measures the external voltage and displays the conversion result the terminal application.
mtb-example-psoc6-pdm-pcm This example demonstrates how to use the pulse-density modulation/pulse-code modulation (PDM/PCM) hardware block in PSoC® 6 MCU with a digital microphone.
mtb-example-psoc6-capsense-buttons-slider This code example features a 5-segment CapSense slider and two CapSense buttons. Button 0 turns the LED ON, Button 1 turns the LED OFF, and the slider controls the brightness of the LED.
mtb-example-psoc6-dual-cpu-ipc-sema This example demonstrates how to use the inter-processor communication (IPC) driver to implement a semaphore in PSoC 6 MCU. The semaphore is used to lock to control access to a resource shared by the CPUs and synchronize the initialization instructions.
mtb-example-psoc6-low-power-comp-hibernate-wakeup This code example demonstrates the functionality of wakeup from the Hibernate mode using the Low-Power Comparator (LPCOMP). It uses a dedicated GPIO input to compare the input voltage to an internal reference voltage to wake the PSoC 6 MCU from Hibernate. A user LED indicates the current power mode.
mbed-os-example-csdidac This code example demonstrates using the CSD hardware-block-based current digital-toanalog converter (CSDIDAC) as a current source and a current sink in PSoC6 MCU.
mtb-example-psoc6-smartio-i2s This example uses a SPI resource and Smart I/O in PSoC 6 MCU to implement the Inter-IC Sound (I2S) Master interface (TX only).