Infineon PSoC 6 Getting Started
Hide thumbs Also See for PSoC 6:

Advertisement

Quick Links

AN221774
Getting started with PSoC

About this document

Scope and purpose
AN221774 introduces the PSoC
Cortex-M0+ processors. This application note helps you explore PSoC
tools, and shows you how to create your first project using PSoC
you to more resources available online to accelerate your learning about PSoC
PSoC
6 MCU with Bluetooth
with PSoC
6 MCU with BLE Connectivity on PSoC
Associated part family
All
PSoC
6 MCU
devices
Software version
PSoC
Creator 4.2
More code examples? We heard you.
To access an ever-growing list of hundreds of PSoC
Please visit the
GitHub
6. You can also explore the PSoC

Table of contents

About this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1
Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
1.1.2
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2
Development ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.1
PSoC
2.2
Firmware/application development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.2.1
Choosing an IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.2
PSoC
2.2.2.1
PSoC
2.2.3
2.3
Support for other IDEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4
RTOS support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.1
2.5
Programming/debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6
PSoC
3
Device features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4
My first PSoC
4.1
Using these instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Application Note
Please read the sections "Important notice" and "Warnings" at the end of this document
www.infineon.com
6 MCU, a dual-CPU programmable system-on-chip with Arm
®
Low Energy (LE) Connectivity device family, refer to
site for a comprehensive collection of code examples using ModusToolbox IDE for PSoC
video library here.
resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Creator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Creator help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Creator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6 MCU development kits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6 MCU on PSoC
6 MCU architecture and development
Creator. This application note also guides
Creator.
code examples, please visit our
6 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Creator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Creator
®
®
Cortex
M4 and
6 MCU. To get started with the
AN210781
- Getting Started
code examples web
002-21774 Rev. *G
2022-07-21
page.

Advertisement

Table of Contents
loading

Summary of Contents for Infineon PSoC 6

  • Page 1: Table Of Contents

    Using these instructions ..............13 Application Note Please read the sections "Important notice" and "Warnings" at the end of this document 002-21774 Rev. *G www.infineon.com 2022-07-21...
  • Page 2 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator Table of contents About the design ............... 13 Part 1: Create a new project from scratch .
  • Page 3: Introduction

    ™ PSoC Creator, the schematic-based design tool. ™ Figure 1 illustrates an application-level block diagram for a real-world use case using PSoC 6 MCU. PSoC 6 MCU TFT LCD Display Universal Digital Buck Block (UDB)- I2C Block Converter Based LCD...
  • Page 4: Prerequisites

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 1 Introduction • Digital logic (Universal Digital Blocks or UDBs) and peripherals (Timer Counter PWM or TCPWM) to drive the display and LEDs respectively. • Product security features managed by CM0+ CPU and application features executed by CM4 CPU Device features and the device datasheets for more details.
  • Page 5: Development Ecosystem

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 2 Development ecosystem Development ecosystem ™ PSoC resources ™ A wealth of data available here helps you to select the right PSoC device and quickly and effectively integrate ™ ™...
  • Page 6: Choosing An Ide

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 2 Development ecosystem Mbed OS ecosystem – provides an embedded operating system, transport security and cloud services to create connected embedded solutions Amazon FreeRTOS ecosystem – extends the FreeRTOS kernel with software libraries that make it easy to securely connect small, low-power devices to AWS cloud services ModusToolbox ™...
  • Page 7: Creator Help

    FreeRTOS. This source code makes it easier to develop the firmware for supported devices. It helps you quickly customize and build firmware without the need to understand the register set. ™ For the PSoC Creator environment, Infineon provides the Peripheral Driver Library (PDL). The PDL supports ™ ™ ™...
  • Page 8: Support For Other Ides

    Creator provides Components that are based on the PDL. This retains the essence of PSoC Creator in utilizing Infineon or community-developed and pre-validated Components. However, the PDL is a source code library that you can use with any development environment.
  • Page 9: Rtos Support

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 2 Development ecosystem ™ – PSoC 6 MCU Importing Generated Code into an IDE provides detailed steps for manually importing the generated code into another IDE. RTOS support ™ 2.4.1 RTOS support with PSoC Creator...
  • Page 10: Mcu Development Kits

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 2 Development ecosystem ™ PSoC 6 Wi-Fi BT Prototyping Kit (CY8CPROTO-062-4343W) has the KitProg3 onboard programmer/ debugger. It supports Cortex Microcontroller Software Interface Standard - Debug Access Port (CMSIS-DAP). See the KitProg3 User Guide for details.
  • Page 11: Device Features

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 3 Device features Device features ™ The PSoC 6 MCU device has an extensive feature set as shown in Figure 4. The following is a list of its major features.
  • Page 12 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 3 Device features ™ Figure 4 PSoC 6 MCU block diagram Application Note 002-21774 Rev. *G 2022-07-21...
  • Page 13: Mcu Design Using Psoc

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator ™ ™ My first PSoC 6 MCU design using PSoC Creator This section does the following: ™ •...
  • Page 14: Part 1: Create A New Project From Scratch

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator ™ Figure 5 My first PSoC 6 MCU design Part 1: Create a new project from scratch This section takes you on a step-by-step guided tour of the design process.
  • Page 15 See Figure 9 for help with this step. Click Target device In the family drop-down menu, select PSoC 6 In the device drop-down menu, select PSoC 62 Click Next. The Select project template panel appears Application Note 002-21774 Rev.
  • Page 16 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator ™ ™ PSoC Creator uses CY8C6247BZI-D54 as the default device in the PSoC 6 MCU family. This device is ™...
  • Page 17 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator If you expect to export the code from the project, specify the target IDE. By default, all export options are disabled.
  • Page 18: Part 2: Implement The Design

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 12 Project naming and location ™ You have successfully created a new PSoC Creator project. Part 2: Implement the design ™...
  • Page 19 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Workspace Component Explorer Catalog Component Search Box Figure 13 Schematic and component catalog Place Components in the design This design uses several Components: three digital output pins, a UART, a Watchdog Timer, and an Interrupt.
  • Page 20 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Drag and Drop Components Figure 14 Place components in the design ™ PSoC Creator gives each Component a default name and properties. Default values may or may not be suitable for any given design.
  • Page 21 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Click to view PDL Documentation Click to view Component datasheet Figure 15 Configuring an output pin component Notes: Each Component has an associated datasheet that can be accessed from the configuration window.
  • Page 22 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Double-click the Component to open the configuration window. The design uses this Component to display messages in a terminal window at a baud rate of 115200 bps Change the Name of the Component instance to UART.
  • Page 23 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 18 Configuring the TCPWM component Configure the interrupt Component In this step, you configure the SysInt Component to map the TCPWM interrupt to the CM4 CPU. Open the Component customizer and follow the steps illustrated in Figure Change the Name to Isr_Timer...
  • Page 24 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 20 Connect TCPWM peripheral interrupt to CM4 CPU Set the physical pins for each Pin Component One task remains to complete the design.
  • Page 25 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 21 Pin assignment Configure System Clock The design uses default values for the high-frequency system clock settings. Although you do not modify ™...
  • Page 26 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 22 Clock configuration Configure System Interrupts In this step, you configure the system interrupts. See Figure In the Workspace Explorer pane, double-click the Interrupts that is under Design Wide Resources.
  • Page 27: Part 3: Generate Source Code

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 23 Interrupt configuration The next part in the development process is to generate code. Note: This exercise does not detail how to export your work to a target IDE. However, if you wish to use a target IDE, this is the point in the workflow where you would ensure that the correct target IDE is selected before you generate the source code.
  • Page 28 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 24 Generate application ™ ® Background: PSoC 6 MCU is a dual-CPU platform. You can target firmware to run either on Cortex -M4 or ®...
  • Page 29: Part 4: Write The Firmware

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator By convention, files targeted to run on the CM0+ CPU are located in the folder and files targeted to run on CM0p the CM4 CPU are located in the folder.
  • Page 30 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Code listing 1 /* Header files includes*/ #include "project.h" main(void) __enable_irq(); /* Enable global interrupts. */ /* Enable CM4. CY_CORTEX_M4_APPL_ADDR must be updated if CM4 memory layout is changed.
  • Page 31 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Code listing 2 /* Header files includes*/ #include "project.h" /******************************************************************** * Macros *********************************************************************/ #define LED_ON #define LED_OFF (!LED_ON) /******************************************************************** * Function Prototypes...
  • Page 32 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator for(;;) if(LEDupdateFlag) /* Clear the flag */ LEDupdateFlag false; /* Invert the LED state*/ Cy_GPIO_Inv(Pin_GreenLED_0_PORT, Pin_GreenLED_0_NUM); /******************************************************************** * Function Name: UartInit *********************************************************************/ void...
  • Page 33 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator void Isr_Timer(void) /* Clear the TCPWM peripheral interrupt */ Cy_TCPWM_ClearInterrupt(Timer_HW, Timer_CNT_NUM, CY_TCPWM_INT_ON_TC /* Clear the CM4 NVIC pending interrupt for TCPWM */ NVIC_ClearPendingIRQ(Isr_Timer_cfg.intrSrc);...
  • Page 34: Part 5: Build The Project And Program The Device

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Part 5: Build the project and program the device ™ This section shows how to program the PSoC 6 MCU device.
  • Page 35 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 28 Connecting to a device Note: For programming the board, you can pick either target. The CPUs share the same memory space.
  • Page 36: Part 6: Test Your Design

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator ™ You can view the programming status in the lower left corner of the PSoC Creator window, as Figure 30 shows Figure 30...
  • Page 37 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator ™ ™ 4 My first PSoC 6 MCU design using PSoC Creator Figure 32 Configuring the Baud rate in Tera Term Reset the device Press the reset switch (SW1) on the Pioneer Kit. The following message appears on the terminal as Figure shows Figure 33...
  • Page 38: Summary

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator 5 Summary Summary ™ This application note explored the PSoC 6 MCU device architecture and the associated development tools. ™ PSoC 6 MCU is a truly programmable embedded system-on-chip with configurable analog and digital peripheral functions, memory, and a dual-CPU system on a single chip.
  • Page 39 ™ ™ Getting started with PSoC 6 MCU on PSoC Creator Related application notes and code examples ™ Table 3 (continued) Documents related to PSoC 6 MCU features Document Document name ™ CE220169 PSoC 6 MCU Periodic Interrupt Using TCPWM GPIO ™...
  • Page 40: Glossary

    ™ ™ Getting started with PSoC 6 MCU on PSoC Creator Glossary Glossary ™ This section lists the most commonly used terms that you might encounter while working with PSoC family of devices. ™ • Component Customizer: Simple GUI in PSoC Creator that is embedded in each Component.
  • Page 41: Revision History

    New application note ™ 2018-10-04 Updated for ModusToolbox 2018-10-31 Updated images 2018-11-15 Updated for public release ™ 2019-02-19 Updated for ModusToolbox ™ 2019-10-14 Removed content for ModusToolbox 2021-03-14 Updated to Infineon Template 2022-07-21 Template update Application Note 002-21774 Rev. *G 2022-07-21...
  • Page 42: Disclaimer

    Infineon Technologies, All Rights Reserved. information given herein in the real application. Infineon Technologies’ products may not be used in Infineon Technologies hereby disclaims any and all any applications where a failure of the product or warranties and liabilities of any kind (including without...

Table of Contents