Cypress CE221773 Manual

Psoc 6 mcu - hello world example

Advertisement

Objective
This code example demonstrates the implementation of simple UART communication and LED control using PSoC
The UART and LED control tasks are executed by the Arm
Overview
This example uses the Cortex-M4 (CM4) CPU of PSoC 6 MCU to execute two tasks: UART communication and LED control.
At device reset the Cortex-M0+ (CM0+) CPU enables the CM4 CPU. The CM4 CPU uses UART Component to print a "Hello
World" message in a UART terminal emulator and when the Enter Key is pressed by the user, the LED on the PSoC 6 MCU
WiFi-BT Pioneer Kit starts blinking.
Requirements
Tool:
PSoC
Creator™ 4.2;
Programming Language: C (Arm
Associated Parts: All
PSoC 6 MCU
Related Hardware:
CY8CKIT-062-WiFi-BT PSoC 6 WiFi-BT Pioneer Kit, CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit
Hardware Setup
This example uses the PSoC 6 WiFi-BT Pioneer kit's default configuration. Refer to the
configured correctly. You can also use PSoC 6 BLE Pioneer Kit to test this example by modifying the project to use the PSoC
6 MCU with BLE Connectivity device on the board.
Software Setup
This project uses Tera Term as a UART terminal emulator for displaying the output messages. You can use the terminal
emulator software of your choice.
Operation
Plug the CY8CKIT-062-WiFi-BT Pioneer kit board into your computer's USB port.
1.
2.
Build the project and program the PSoC 6 MCU device. Choose Debug > Program menu for this step. For more
information on device programming, see PSoC Creator Help. Note that the flash for both CPUs is programmed in a single
program operation.
3.
Open a UART terminal emulator. Set the baud rate to 115200 bps.
Press the reset switch (SW1) on the Kit. Observe the "Hello World!!!" message on the UART terminal.
4.
5.
Press the Enter key to start blinking the LED on the kit.
6.
Observe the LED blinking every second.
www.cypress.com
Peripheral Driver Library
(PDL) 3.0.1
®
GCC 5.4.1 and Arm MDK 5.22)
parts with dual CPU
Document No. 002-21773 Rev.*A
CE221773 – PSoC 6 MCU - Hello World
®
®
Cortex
-M4 CPU of PSoC 6 MCU.
®
Kit user guide
to ensure that the kit is
Example
6 MCU.
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CE221773 and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress CE221773

  • Page 1 CE221773 – PSoC 6 MCU - Hello World Example Objective ® This code example demonstrates the implementation of simple UART communication and LED control using PSoC 6 MCU. ® ® The UART and LED control tasks are executed by the Arm Cortex -M4 CPU of PSoC 6 MCU.
  • Page 2 PSoC 6 MCU - Hello World Example Figure 1. CY8CKIT-062-WiFi-BT PSoC 6 WiFi-BT Pioneer Kit RGB LED PSoC 6 MCU USB CONNECTION TO PC RESET SWITCH Figure 2. Output Message as Displayed on Tera Term www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 3 Configure and Start the UART Component Print the message Set the LEDupdateFlag “Hello World” on to UART terminal Exit TCPWM “Enter” key Interrupt Handler pressed? Configure TCPWM Interrupt LEDupdateFlag = true Clear LEDupdateFlag Toggle LED state www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 4 5 Timer Generates an interrupt once per second (TCPWM) Interrupt Isr_Timer Routes the TCPWM interrupt to CM4 CPU Default settings used For information on the hardware resources used by a Component, see the Component datasheet. www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 5 Timer Counter Component. The Timer Counter Component is configured as a timer and generates an interrupt every second. Figure 5. Timer Counter (TCPWM) Component Configuration Settings Figure 6 shows the system interrupt configuration used in this design. Figure 6. System Interrupt Configuration www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 6 This example is designed for the CY8CKIT-062-WiFi-BT PSoC 6 WiFi-BT pioneer kit. To port the design to a different PSoC 6 MCU device and/or kit, change the target device using the Device Selector as needed. www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 7: Related Documents

    PSoC 6 MCU: PSoC 63 with BLE Datasheet PSoC 6 MCU: PSoC 63 with BLE Architecture Technical Reference Manual Development Kit (DVK) Documentation CY8CKIT-062-WiFi-BT PSoC 6 WiFi-BT Pioneer Kit CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit www.cypress.com Document No. 002-21773 Rev.*A...
  • Page 8: Document History

    PSoC 6 MCU - Hello World Example Document History Document Title: CE221773 - PSoC 6 MCU - Hello World Example Document Number: 002-21773 Revision Orig. of Submission Description of Change Change Date 6020769 VKVK 02/09/2018 New code example 6091134 VKVK...
  • Page 9: Worldwide Sales And Design Support

    Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products.

Table of Contents