Exploring the Power of Infinion’s ModusToolbox and the PSoC™ 62S2 Evaluation Kit: A RoadTest Review

Table of contents

RoadTest: Enroll to Review ModusToolbox™ Software with the Infineon PSoC™ 62S2 Evaluation Kit

Author: skruglewicz

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: PSoC™ 62S2 Wi-Fi BT Pioneer Kit PSoC 62S4 Pioneer Kit (CY8CKIT-062S4) CY8CPROTO-062S4-4343W

What were the biggest problems encountered?: The main challenge I faced during this review was learning how to use the Device Configurator with Arduino Headers. As someone new to this process, it presented a learning curve. However, I managed to overcome this hurdle by seeking guidance from online forums and by studying examples and videos. Eventually, I successfully managed to connect sensors to the pins on the Arduino Headers, thanks to the resources and support I found.

Detailed Review:

A RoadTest Review of ModusToolbox Software with the Infineon PSoC 62S2 evaluation kit (CY8CEVAL-062S2) I am thrilled to be a part of this RoadTest Review ModusToolbox Software with the Infineon PSoC 62S2 Evaluation Kit  The review describes my experience using ModusToolbox Software (MTB) with the Infineon PSoC 62S2 Evaluation Kit.  I am grateful to Infineon and the Element14 Roadtest Teams for this opportunity. I am looking forward to learning more about MTB and the PSoC 62S2 Evaluation Kit. I am also excited to share my thoughts and experiences with others. I believe that MTB and the PSoC 62S2 Evaluation Kit have the potential to be very powerful tools for embedded development. I am eager to see what others create with them.

But first, allow me to introduce myself briefly. I am a retired Senior Software Engineer with a Bachelor's of Science Degree in Computer Science from Boston University. I graduated in 1980 and worked as a Software Engineer until I retired in 2018. I am a passionate embedded systems maker/hobbyist with a strong background in software development and hardware integration. I have acquired a tremendous amount of knowledge in embedded development toolchains by participating in RoadTest and Design Challenges, sponsored by various vendors, here on element14 and on Hackster.io. As well as using MTB for several Infineon PsoC6 EVK’s, I have evaluated the software toolchains for NXP, Lattice, Renesas, Nordic, Arduino, and the Raspberry PI. I am excited to be able to share my knowledge and experience with others through this platform. I hope to learn from others as well and to build a community of like-minded individuals.

I would like to emphasize that I am not a novice user of MTB, and have intermediate experience with it, particularly using the following PSoC6 development kits:

  • PSoC 62S2 Wi-Fi BT Pioneer Kit
  • PSoC 62S4 Pioneer Kit (CY8CKIT-062S4)
  • CY8CPROTO-062S4-4343W

These additional kits have provided me with valuable hands-on experience and a deep understanding of the capabilities and features of the PSoC6 family. I have experience with multiple versions of MTB running on my Windows 10 PC. I have the new 3.1 version as well as 3.0 and 2.4 installed on my PC.

Three Goals of this review

The RoadTest sponsor, Infineon, is seeking feedback on the following 3 points for this review.

  1. Test the getting started experience of ModusToolbox:
  2. Explore the flexibility of ModusToolbox
  3. Working with the PSoC 62S2 Evaluation Kit and ModusToolbox

The following sections are my thoughts on the specific RoadTest goals outlined by infineon.

GOAL #1 - Test the getting started experience of MTB

With my previous experience using MTB with the PSoC6 Wi-Fi BT Pioneer Kit, PSoC 62S4 Pioneer Kit, CY8CPROTO-062S4-4343W , and the CY8CEVAL-062S2 supplied for the RoadTest, I was able to gain more experience with MTB.

  • I evaluated the availability and accessibility of resources required to start development with MTB
    • I found more resources to read and watch on the Infineon website. I took a deep dive into MTB 3.1 
    • I did an assessment of the onboarding process from the perspective of an intermediate user
  • Later in this review, I highlight the code examples that I found particularly useful in getting started. With MTB3.1
  • I found it easy to find and install the necessary software and drivers for ModusToolbox 3.1
  • The PSOC6 and ModusToolbox Forums were very helpful in answering all my questions.
  • The  online documentation explains the features and capabilities of ModusToolbox very well
  • My overall impression of ModusToolbox 3.1 is that it is a big improvement over previous versions. 
  • In Modustoolbox 3.1, there seem to be some fixes to the MTB.3.0 IDE
  • I checked out the PDF from the release notes in my installation directory in C:\Users\skrug\ModusToolbox\docs_3.1
  • Overall I was able to install, and start programming with the latest version of MTB and started to explore the new features of ModusToobox 3.1

GOAL #2 - Explore the flexibility of MTB

Drawing from my previous experiences to provide insights into the ease of use, availability of necessary tools, and overall user experience of Programming and Debugging, I will include two Element 14 Design challenges that used MTB and PSoC 6 evaluation kits. The PSoC 62S4 Pioneer Kit  and The PSoC 62S2 Wi-Fi BT Pioneer Kit I did have to go through a steep learning curve to get familiar With Programming using MTD with PSoC 6 Evaluation kits. Debugging Is very easy to grasp if you have used a debugger before. Programming on the other hand is more difficult to master. I am still trying to master the MTB Toolchains and IDE,and it is starting to make more sense to me.I thought I would include a brief description and links to the Blog series for each one

  • The PSoC 62S4 Pioneer Kit from a design challenge on element14.

    • If you are interested, here are the links to my 5 Blog Series for the challenge
    • In this challenge, I utilized FreeRTOS to design a project using the Scheduler, Semaphores, and Queues of the RTOS. I also took advantage of the dual-core capabilities of the kit, using IPC and Semaphores to communicate between the cores. To interface with the kit, I utilized the Thermistor and Ambient Light Sensors, effectively passing data between the cores. Furthermore, I utilized the Capsense Buttons to control various operations in the project. By leveraging my experience in this design challenge, I will bring valuable insights into the functionality and capabilities of the PSoC 62S4 Pioneer Kit when working with the dual core debugging and dual BSP support in MTB 3.x.
  • The PSoCTm 62S2 Wi-Fi BT Pioneer Kit

  • For this review, I used the newly released ModusToolbox 3.1. This release fixes a few things that were annoying in version 3.0 and 2.4.
    • The most helpful is debugging dual core firmware. The file structures were rearranged in 3.0 to allow the developer to debug firmware running on each core simultaneously..
    • another helpful addition is they have made it better to allow switching BSP's in existing projects.
  • I really dove into into the Library manager and the Device configurator for this review and I describe my experience later in this review. I also show the ease of loading in projects from other boards and switching to the PSoC kit used in this review.
  • I investigated available middleware options and evaluate their usability and compatibility with the PSoC 62S2 Evaluation Kit, as well as the PSoC6 Wi-Fi BT Pioneer Kit, CY8CPROTO-062S4-4343W and the CY8CEVAL-062S2 supplied for the RoadTest. 

GOAL #3 - Working with the PSoC 62S2 Evaluation Kit and ModusToolbox

This section describes working with MTB and the CY8CEVAL-062S2 supplied for the RoadTest

Getting Started with the CY8CEVAL-062S2 

  • The kit comes with a 4 page “Quick Start Guide”, which can be viewed here QUICK START GUIDE
  • The 2nd page, describes how to connect the kit to your PC and run the demo blinky example that is preinstalled on the kit. The instructions are as follows and a screenshot of the results shows the correct results of completing all the steps..
    • Before you start, ensure that you have the following: 
      • – PC with USB port 
      • – UART terminal software such as Tera Term or Minicom 
    •  Connect and power up the board 
      • Ensure that jumper J18 is at position 3–5 to select 3.3 V. 
      • Connect the KitProg3 USB connector (J9) to your PC.
      • Wait for the driver installation to complete. 
    • Connect the kit with the UART terminal software.
      • Open the UART terminal software and connect to the kit’s USB-to-UART COM port with the following settings: – Baud rate: 115200, Data: 8 bit, Parity: None, Stop bit: 1 bit, Flow control: None  
      • Press the XRES button (SW1) to reset the device. 
    • Run the pre-programmed code example 
      • Observe the “Hello World!!!” message on the serial terminal and confirm that the user LED blinks at 1 Hz 
      • Press the Enter key to pause or resume blinking the user LED.
    • And Finally at the bottom of the Page there is a Note referring to the  Sterling-LWB5+ M.2 radio module from Laird Connectivity. The included antenna is not connected to the kit. You will need to refer to the following guide for instructions on how to attach it. There is a picture in the starter guide, but the kit guide gives more detail.
    • Refer to theCY8CEVAL-062S2 PSoCTm 62S2 evaluation kit guide,  On page 26,“Kit operation” , Section  2.2 “M.2 wireless connectivity module “, to connect the supplied antenna.
    • OVERVIEW - The PSoCTm 62S2 evaluation kit provides the option to connect AIROCTm Wi-Fi & Bluetooth® combo radio modules to the M.2 interface connector on the board. This combination of PSoCTm 6 host MCU and radio module enables users to evaluate Wi-Fi/Bluetooth® IoT applications. The M.2 radio module is not required if the application does not require Wi-Fi/Bluetooth® connectivity. Some M.2 radio modules require an external antenna certified by the module vendor. The Sterling-LWB5+ M.2 module from Laird Connectivity provided with this kit requires an external antenna. 
    • To connect the FlexPIFA antenna from Laird Connectivity provided with this kit, follow these steps:
      • Connect the FlexPIFA antenna from Laird Connectivity to the MHF4L connector, ANT0. Make sure that the antenna is fully inserted into the connector
      • The FlexPIFA antenna from Laird Connectivity comes with a 3M adhesive. You can either stick the antenna to the base board as shown in Figure 9, or leave the antenna hanging freely.
    • Figure 9 shows the PSoCTm 62S2 evaluation board + Sterling-LWB5+ M.2 module from Laird Connectivity with the antenna connected.
    • image
    • Once the antenna is connected, you can power on the PSoCTm 62S2 evaluation kit and begin using the Wi-Fi/Bluetooth® features
    • The FlexPIFA antenna is a small, lightweight antenna that is ideal for use in IoT applications.The antenna is also resistant to water and dust, making it ideal for use in outdoor applications.
    • Once the antenna is connected, you can either stick it to the baseboard or leave it hanging freely. If you choose to stick it to the base board, use the 3M adhesive that is provided with the antenna. If you choose to leave the antenna hanging freely, you can use a piece of string or wire to suspend it from the board.
  • On page 3, there is a helpful detail photo of the  PSoCTm 62S2 Evaluation Board. The numbered list is excelent in describing the location of components (headers pins, onboard periferals and sensors) on the front of the board. This is a handy resorce to have on hand when working with the kit. I keep it next to me when working with the board.
    • image
  • On page4, there is a helpful pinout detail photo of the  PSoCTm 62S2 Evaluation Board. Another great resorce available on a quick card.. This very useful when your connecting Periperals to the Kit. I use it later to determine the digital pins to configure to connect to the Arduino headers. Nice job Infineion.
    • image

Conclusions on the Getting Started guide

This starter guide is better than most other Evaluation kits from Infineon and other Manufactures that I have evaluated. It was concise and included links into relevant Infineon Website kit pages,  The Pinout and Board component Descriptions pages are a great addition to a quick gude pamphlet. You do not see much detail anymore in a quick card anymore. It is very helpful and I really like having it to refer to instead of getting it from an online document.

Next steps 

  • Visit the kit webpage CY8CEVAL-062S2 - Infineon Technologies for information on:
    • Code examples supported for this kit, 
    • Kit documentation
    • Kit Features 
    • and Kit contents.
  • Download and install the required software.
    • ModusToolboxTm software can be used to develop applications for the PSoCTm 62S2 evaluation kit. It provides a board support package (BSP) and validated code examples to help you get started. To download the latest version of the software, please visit the ModusToolboxTm webpage. I installed the latest version of ModusToolbox version 3.1, which I describe above in GOAL#1
  • Code Examples available for the Kit include:
  • Code examples based on PSoCTm 6 as a standalone MCU
    • See the GitHub repository for the list of PSoCTm 6 MCU code examples. Choose the “CY8CEVAL-062S2” BSP in ModusToolboxTm software for evaluation of the code examples.
  • Code examples based on PSoCTm 6 MCU and AIROCTm Wi-Fi/Bluetooth® combo devices for cloud-connected applications
    • See the GitHub repository for the list of AnyCloud IoT SDK code examples. Choose the appropriate BSP based on the M.2 module plugged into the evaluation board. The supported M.2 modules and corresponding BSP name is CY8CEVAL-062S2-LAI-4373M2 as mentioned in the next section.
  • The PSoCTm 62S2 evaluation kit provides software evaluation support for the following M.2 radio module that comes attached to the kit.

BSP name in ModusToolboxTm software: CY8CEVAL-062S2-LAI-4373M2. Make sure you use this BSP name when using wireless examples

How well does ModusToolbox support the PSoC 62S2 Evaluation Kit?

  • Now it’s time to use MTB with examples for the CY8CEVAL-062S2 kit.
  • You should already have the Eclipse  MTB IDE installed and ready to go.
  • I created several projects in a new Workspace.
  • They are described below:
  • Create a workspace directory on your PC.
  • Open the MTB IDE.
  • Create a newModusToolbox  project
  • It might be noted: 
    • “ModusToolboxTm software provides the Project Creator as both a GUI tool and the command line tool, "project-creator-cli". The CLI tool can be used to create applications from a CLI terminal or from within batch files or shell scripts. This tool is available in the {ModusToolboxTm software install directory}/tools_{version}/project-creator/ directory.”
    • I usually use the project Creator from the IDE. Nice to have multiple ways to run the Toolchain though. I have seen a demo where they create a project with the Project Creator standalone tool then use Visual studio code to build and run the firmware. 
    • At the Core of the PsoC 62 Webinar - element14 Community
  • Select the Following from the BSP
  • CY8CEVAL-062S2 or CY8CEVAL-062S2-LAI-4373M2 as described below.
    • image
  • I chose CY8CEVAL-062S2-LAI-4373M, because I am interested in using the Sterling-LWB5+ M.2 module with the WI-FI examples. 
  • From the next dialog select your example project and press the Create button
    • image
  • The examples will be created in your Workspace.

The EXAMPLES

  • To start,evaluating the Kit, I wanted to experiment with the following 4 examples:
    • Hello World.
    • 3 WIFI EXAMPLES
      • Connecting to AZURE I0T
      • Tester - Wi-Fi Bluetooth Console
      • Tester - Wi-Fi Cert Tool
  • HELLO WORLD
    1. Had trouble creating this on a USB stick along with other examples all at once? Not sure if this is because it’s a USb Device? Error is User does not own this directory? I created a WP on C: folder and was able to create the project and correctly build it..
    2. I like to use the Launch option to build by selecting it from the Lause menu as described below:
    3. image
    4. If you get a successful build, you will see a breakpoint in main.c as described above on the right hand side. The bracket is highlighted in green.
    5. Run it and you should get the same results as the Out Of the Box firmware?
    6. Debug it by using the debug toolbar described below
    7. image
    8. The results were the same for the other PSoC6 EVK that I used. Which makes developing with different Kits a breeze.
  •  Three WI-FI Examples
    • The following examples were created in my workspace. The README descriptions are available in the MTB IDE or on the Github repo. The README descriptions should be followed to ensure a successful experience. They contain information such as prerequisites, project configurations, code changes, and other tools used in the example. This section will describe my results using these examples. I ran the examples and found that they worked as expected. The results were consistent with the expectations set forth in the README descriptions. I am confident that these examples can be used as a starting point for creating new projects.

      EXAMPLE 1 -- Connecting to AZURE I0T – Connecting to Azure IoT services using Azure SDK for Embedded C

      • REPO: GitHub - Infineon/mtb-example-azure-iot:.
      • OVERVIEW
        • This code example illustrates how to connect to Azure IoT services using the Azure SDK for Embedded C and Infineon's Wi-Fi connectivity SDK. It demonstrates features such as IoT hub - C2D (Cloud to Device), Telemetry, Methods, Twin, Azure Device Provisioning (DPS), and PnP (Plug and Play).
        • In this example, the Azure C SDK port is used with the MQTT library to connect to the Azure cloud. IoT device authentication can be either X509 certificate-based or shared access signature (SAS)-based. At startup, the application provides a menu displaying features of Azure IoT Hub service. Depending on the use case selected, message transmission takes place either from cloud to MCU device or vice versa.
          The code example is provided as a reference and may need to be modified to fit specific needs. The README instructions must be followed to totally understand how to use this example to experiment with the AZURE IoT hub-C2D. This a very complex example and will require some time to learn how to set up and use it.
      • MY EXPERIENCE
        • I followed directions in the README file and attempted to try Building the firmware.I decided to use the quick panel launch link Debug, bypassing building the project first. I had a build problem, but I managed to get the formware to build prperly, by using the "Build Application" link in the quick panel
        • Here was the PROBLEM
          • After using the Quick panel Debug I was given errors?
          • fatal error: opening dependency file C:/000ET13-62S2_EVK_WP/Connecting_to_Azure_IoT/build/APP_CY8CEVAL-062S2-LAI-4373M2/Debug/ext/mtb_shared/aws-iot-device-sdk-embedded-C/202103.00/libraries/aws/ota-for-aws-iot-embedded-sdk/source/dependency/3rdparty/tinycbor/src/cborencoder_close_container_checked.d: No such file or directory cborencoder_close_container_checked.c
          • /mtb_shared/aws-iot-device-sdk-embedded-C/202103.00/libraries/aws/ota-for-aws-iot-embedded-sdk/source/dependency/3rdparty/tinycbor/src line 55 C/C++ Problem
          • The FIle in question is described  below:
            • image
          • ALSO The AZURE APP AND BLE TESTER APP were no LONGER IN THE PROJECT MANAGER? IT WAS GONE?
          • Here are the folders that were missing from the IDE file manager.. Luckely they were still in the DIRECTORY:So I was able to reload them in the MTB IDE. I was unable to reproducr this again
            • image
      • SOLUTION:

      • I was able to build with no problem using the “Build Application” on the quick Launch Panel.
        I'm not sure why I had the build problem described above. I am quessing that the build application command, gets dependancies but the Quick panel Launch commands do not.  Now that the build works I followed the README file to get the EXAMPLE working
      • CONCLUSION
        I found this example a bit more complex configuring, and working compared to other mcu vendor wifi to azure examples 
    • EXAMPLE 2 – Tester - Wi-Fi Bluetooth Console - Wi-Fi Bluetooth® tester
      • REPO: GitHub - Infineon/mtb-wifi-bluetooth-tester
      • OVERVIEW
        • This application integrates the command console library including Wi-Fi iPerf and Bluetooth® Low Energy functionality. You can use this application to characterize the Wi-Fi/Bluetooth® LE functionality and performance.
        • This application provides a console interface to test Wi-Fi and BLE commands. See the command console library Readme.md for more information.
        • MY EXPERIENCE
        • I followed the directions in the README file and was able to get this example running.
        • Building the firmware is straightforward.
      • CONCLUSION
        • I found this example to be very helpful to diagnose my WiFI and test Bluetooth functionality.
    • EXAMPLE 3 - Tester - Wi-Fi Cert Tool - Wi-Fi Cert Tester tool for ModusToolbox SDK
      • REPO: Wi-Fi Cert Tester tool for ModusToolbox SDK
      • OVERVIEW
        • The Wi-Fi Cert Tester tool is used for Wi-Fi certification of 802.11n-PSK, WPA2 Enterprise security, PMF, 802.11ac, WPA3 and WPA3-R3(Personal) support for CY8CEVAL-062S2-MUR-43439M2, CY8CEVAL-062S2-LAI-4373M2 and CY8CKIT-062S2-43012.
        • This tool uses the command console asset to initialize and invoke the wifi-cert middleware init function.
        • The tool accepts commands from the UCC Test Agent on a serial terminal (UART interface), executes the UCC test commands, and responds to the UCC Test Agent by sending the response in the serial console.
        • Wi-Fi certification using the tool needs knowledge of the Wi-Fi Alliance test beds and associated software tools and hardware. Instructions in this document conform to the certification requirements of the Wi-Fi Alliance organization. 
        • See Wi-Fi CERTIFIED Certification Overview
      • .MY EXPERIENCE
        • I followed the directions in the README file and was able to get this example running.
        • Building the firmware went really well.. No problems were encountered.
      • CONCLUSIONS
        • This example was also an excellent tool to diagnose my wifi network.

Evaluate the ease of leveraging the capabilities of the PSoC62S2 - (CY8CEVAL-062S2) Evaluation Kit.

Evaluating the ease of leveraging the capabilities of an evaluation is a complex task. It depends on a number of factors, including the user's experience level, the specific kit being used, and the intended use of the kit. I decided to evaluate two Capabilities of the kit by Importing a previous example that I created for another PSoC6 EVK and Using the Arduino Headers to connect things.

Importing a previous example that I created for another PSoC6 EVK

  • I wrote firmware to test the capabilities of the The PSoC 62S4 Pioneer Kit  in a 5 blog series that I did for  an element14 Design challenge. I wanted to test the same capabilities of the PSoC62S2 kit. I wanted to see if I could import it in the IDE and change the BSP in the project and Run it.
  • The Basic steps are:
    1. IMPORT the project into the IDE
    2. Add and Change the BSP device for the project in the Library manager.
    3. Update the project in Library manager
    4. Build the app in the IDE
    5. Ater a successful build LAUNCH the app using the DEBUG launch link from the Quick pane
  • My 1st attempt was to load the the code from my repo for firmware I develped for a Design challege on element14.com. The firmware runs on the PSoC62S4 Pioner Kit. The challenge consisted of a 5 blog series and I give a link to the series later in this review. The code can be found on my repo:
    • Test-Minimal_FreeRTOS_task1_CAPSENSE_Buttons_task2_printmsg
    • I ran into a PROBLEM using the example From the REPO.  I was never able to successfully create the 2nd step by Adding the BSP
    • I was SUCESSFUL in loading the project from the workspace that I had for the design challenge mentioned. I will describe my steps later in the review.
    • I descibe how I loaded the REPO and where I ran into the problem next.
      • To import and run the firmware on the PSoC 62S2 kit, follow the steps:
        1. Clone the project from my github repo by downloading the zip file
          • image
        2. From the File menu click on Import to open the Import dialog . Select “”Project from Folder or Archive” and press the NEXT button
          • image
        3. Click the “Archive” button and select the zip file you just downloaded. The zip file name will appear in the “import source test box and the projects will be checked. Press “FINISH”
          • image
        4. Now select the imported project and select the Library manager from the Quick launch panel. The Library manager will come up with the path filled in to the project as shown
          1. Now from the libray manager “ADD BSP” button. Select the kit for PSoC62S2. Then select the kit name as the default.. Ttis is important because we want the kit to now be the default when we perform the Update. In the next step
            • image
          2. Press the update button.to update the BSP for the PSoC 62S2
          3. This is where my problem occured adding the BSP. I included the screenshot below.
          4. image
          5. If you can't read the screenshot the cation in RED reads
          6. Summary:
            ERROR:Failed to update application "Test-Minimal_FreeRTOS_task1_CAPSENSE_Buttons_task2_printmsg-master"
            Successfully refreshed dependencies. 
          7. It could be due an incomplete project on my repo..I abamdoned this and wnt on to the next attempt.

  • My 2nd attempt was a total  SUCCESS Using the Example From my directory
    • I was able to perform all the steps outlined above and run the firmware on the kit.
    • Again the steps are:
  1. IMPORT the project into the IDE
  2. Add and Change the BSP device for the project in the Library manager.
  3. Update the project in Library manager
  4. Build the app in the IDE
  5. Ater a successful build LAUNCH the app using the DEBUG launch link from the Quick pane
  • For step 1, I used the same steps as on my first attempt, except I chose the Directory button instead of Archive. 
  • For step 2, I was able to change the BSP as described above and update the BSP successfully.
  • I built the app in the IDE by using the “Build Application” link. This process compiled the app firmware.
  • Finally, I programmed the firmware to the board using the quick panel Launch button for Debug. This button launched the debug session and programmed the firmware to the board.
  • The project in MTB

image

  • Here is the successful output on Tera-Term

image

Using the Arduino Headers to connect things

The PSoC 62S2-43012 ,PSoC 062S4 and the CY8CEVAL-062S2 kits all have Arduino form factor headers allowing them to connect Arduino Shields to them. I was wondering if I could  write some firmware to control things attached to these headers.. The easy way would be to get an existing PSocC 6 SDK library if one exists, but if one does not exist then I need to learn the steps for porting an arduino library for the headers to PSOC6.
I was sure this would be involved, so it turned to the Infinion PSoC6 Forum for some direction for me to connect things to the Arduino headers.Here is the forum question I posted on this topic  

Using the PSoC Arduino Form factor pins to connect an Arduino Shield to a PSOC6 kit using Modus toolbox?

  • I was able to get the information from my forum post and have marked the question as SOLVED. You are welcome to follow the link above to follow my path to enlightenment..I followed the steps suggested by the Forum group to understand how to use the Arduino header pins to connect Arduino shields and shield modules to the pins on this header. Since there is no library for the Grove Base Shield yet, I needed to program an Arduino Shield using the API in Modustoolbox (MTB) by following the links provided: Hardware Abstraction Layer (HAL)  PSoC 6 Peripheral Driver Library: Getting Started
  • I then used this knowledge to map the shield pins to the PSoC 6 pins, which is configured in the pins tab in MTB Device Configurator. ModusToolbox Device Configurator user guide
  • I Watched a few helpful Videos on GPIO that are located on the infinion site.. NOTE BE SURE TO LOGIN BEFORE Running these links or the videos will not show up.
  • MTB Videos is a page on the Infineon site that has all the the vidios available. I watched the following two and used the second one to help me implement my goal of connecting things to the Arduino headers.
  • I reviewed the video Getting started with ModusToolbox - Exploring an application
    • this video will walk through 
      • the various folder structures, 
      • exploring the location of board support package files, 
      • shared libraries, 
      • and ModusToolbox workflow files. 
    • The objective is to make the use of the various files less mysterious and enable developers to take full advantage of the flexibility provided by the ModusToolboxTm development environment. This will be done by providing clear and concise documentation, as well as by providing examples of how the files can be used. Additionally, the ModusToolboxTm development environment will be made more user-friendly, so that developers can easily find the information they need and get started with development. 
  •  ModusToolbox How-To - Creating a Blinky LED
    • This video will walk you through developing a basic blinking LED application using the GPIO drivers of both the Hardware Abstraction Layer (HAL) and Peripheral Driver Libraries (PDLs).
    • It starts,by discussing the basics of GPIOs and how to use them with the HAL. GPIOs,(General Purpose Input/Outputs), are digital pins on a microcontroller that can be configured to either input or output signals. The HAL  (Hardware Abstraction Layer), is a set of APIs that provide a consistent way to access hardware peripherals, such as GPIOs. The PDLs, (Peripheral Driver Libraries), are a set of libraries that provide higher-level APIs for accessing specific peripherals, such as GPIOs.
    • Once  the basics of GPIOs and the HALdiscussed, it moves on to using the PDLs to create a more complex blinking LED application. Then the PDLs to create a function that will turn on and off the LED at a specified frequency., is demonstrated. Then  this function is used to create a simple blinking LED application.
    • By the end of this video,  a basic understanding of how to use GPIOs and the HAL to create a blinking LED application, will be achived. Also a basic understanding of how to use the PDLs to create higher-level APIs for accessing specific peripherals.will be made clear.
    • I was able to get the HAL version of the demo.I was able to experiment on several PSoC kits including 
      • PSOC62S2 WI-FI BT Pioneer Kit
        • BSP: CY8CKIT-062S2-43012
      • PSoC62S2 EVK
        • BSP: CY8CEVAL-062S2
          • This worked great
        • BSP: CY8CEVAL-062S2-LAI-4373M2
          • THIS DID Not WORK
    • I was also able to Add the Code for the PDL by adding the include (#include "cy_pal.h") and the PDL calls from the demo.This worked great on the PSoC62S2 EVK with the BSP CY8CEVAL-062S2
    • I also attempted To use VSCODE.Because I have PlatformIO installed. It was slightly different from the Video?
      • I was able to Create the Project with PROJECT CREATOR.
      • OPEN VSCODE and LOAD the Workspace File
      • BUILD WITH “TERMINAL BUILD”
      • And DEBUG (After Installing the C++ ExT and Cortex Debug)
      • BUT THE BLUE LIGHT DID NOT BLINK? WHY?
        • THE APP is EMPTY_APP_VSCODE in my workspace
  • NEXT: , I tried to connect the Grove LED Socket Kit to  the digital 0  pin on the Arduino Header. Using the Gove connector shown below
    • Grove Soket LED Module
      • image
    • GROVE connector
      • image
    • Use the Blinky example created from the LED video experiment to connect the Grove LED module to digital 0 on the Arduino header. Experiment with blinky to change On board LED to Digital PIN on arduino header with Plugging in the Grove LED directly to the Header.
    • LED Grove MODULE HAS 3 Pins 3.3V(red),GND(black)),SIG(yellow) a wireing diagram of the connection is shown below.
    • image
  • I decided to use what I learnt from the video to toggle the GPIO digital pin on the Arduino J4 header. The HAL implementation using the D3 pin does not work for some reason, but the PDL implementation does, so the following function has to be used just like the GREEN LED in the video demo. You need to use the PDL calls to get it to work.
  • Here is what I did to get the LED on the Grove module to blink.
    • First connect the Grove connector to the Arduino header as described in the wiring diagram above.
    • In the Device Configurator you need to check the CYBSP_D3 Pin and on the the parameters tab you need to Set “General/DeviceMode” to Strong Drive Input buffer Off
    • The following HAL function has to be used just like the GREEN LED from the video demo except you will use defines created in the step above.
  • In the code you need to use the HAL GPIO function with the following defines.:
    • Cy_GPIO_Inv(CYBSP_D3_PORT, CYBSP_D3_PIN);
  • You can get the CYBSP_D3_PORT, CYBSP_D3_PIN defined in the Code Preview in the Device Configurator. as pictured below.

image

image

I was able get all the LEDs to Blink Including the Grove LED, as shown in the video below. You can observe the RED LED blinking wich is the Grove LED midule descibed above.

My Scoring explained 1-5 star ratings

Total Score  =  26

In this section, I'll provide a bit more insight into the reasoning behind my assigned scores. When considering ModusToolbox and the PSoCTm 62S2 Evaluation Kit together, they stand out as one of the most effective combinations for exploring IoT embedded projects. The capabilities of this development environment have left a strong impression on me. To encapsulate, here's a brief overview of the ratings I've given:

Product Performed to Expectations  (5 points)

Working with the Kit was truly enjoyable. Frankly, it exceeded my initial expectations in terms of performance. ModusToolbox 3.1 provided a pleasant experience as well. I can confirm that  I've gained more knowledge about it, using it seemed notably smoother compared to my prior encounters. In summary, both products performed exceptionally well, surpassing my expectations.

Specifications were sufficient to design with (5 points)

The documentation's visuals greatly facilitated the design process. While I didn't engage in extensive design work during this review, I effectively implemented the examples I've discussed, encountering only minor challenges. In summary, the specifications proved highly effective for both utilizing the kit and working within ModusToolbox. It deserves another high score.

Demo Software was of good quality (4 points)

Regarding the operational evaluation of the demo examples, I found them to be of excellent quality. My scoring was influenced by the slightly confusing nature of the contextual links within the documentation pages. However, I managed to successfully implement the examples by utilizing the instructions provided in the example README files.

Product was easy to use (4 points)

The documentation facilitated ease of utilization. Yet, the availability of multiple approaches to achieve a single task introduced complexity within the toolchain workflow. For instance, the presence of three distinct methods for project creation, building, and configuration contributed to this. While ModusToolbox undoubtedly offers substantial power and openness in its development environment, it does exhibit a steeper learning curve compared to the majority of MCU development platforms provided by other manufacturers.

Support materials were available (5 points)

A wealth of support materials is available, often with duplicated information scattered across various sources. However, the array of videos, examples, and documentation provides ample resources to navigate through and accomplish tasks. The Support Forum proves invaluable for addressing queries, particularly the PSOC 6 SDK forum, where expert moderators offer valuable assistance. My engagement with the infineon support forum has been notably beneficial.

The price to performance ratio was good (3 points)

From my perspective as an independent maker and hobbyist, I believe the kit's cost is reasonable. However, it could potentially present affordability challenges for individuals like myself. The kit's remarkable integration of diverse functionalities minimizes the necessity for external peripherals while conducting experiments with the Kit and ModusToolbox. Considering these factors, I've given this score based on a balanced evaluation of price and performance.

Possible Future Experiments

I have only scratched the surface of using the capabilities of the Kit. and I will keep on coming back to this review to refresh my knowledge of the kit and continue to experiment with the kit. Some of the things that I did not have time for,  but will try to came back to are: 

  • Connecting sensors to the kit using the Arduino headers.
  • Developing Libraries for the Arduino headers.
  • Experimenting with Connections to aWs through AnyCLoud.

Resources

ModusToolbox Documentation and Links

ModusToolbox Software
Installation Guide
User Manual
Training Materials

CY8CEVAL-062S2 Evaluation Kit Documentation and Links

Product Page
Device Datasheet
User Manual
Hardware Schematic

PSoC6 Webinar - Infineon Technologies has hosted a free webinar with Clark Jarvis, a software product marketing manager. Clark discusses the new development flows related to  both the Cortex-M0+ and Cortex-M4 cores and new features of ModusToolbox 3.0. The webinar will provide helpful tips and tricks for leveraging ModusToolbox 3.0 with enhanced support for multi-core project workflows. The webinar was presented on November 10th 2022, and interested individuals can watch the recorded webinar supplied at this link. This is a must see




Anonymous