Skip to content
Permalink
eba767705a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

PSoC™ 4: CAPSENSE™ SmartSense buttons slider

This code example demonstrates how to tune self-capacitance (CSD)-based buttons and slider widgets with SmartSense in PSoC™ 4 devices using the CAPSENSE™ tuner.

This document provides a high-level overview of the CSD widgets tuning flow and details on how to use the CAPSENSE™ tuner to monitor the CAPSENSE™ raw data and fine-tune the CSD buttons and slider for optimum performance.

View this README on GitHub.

Provide feedback on this code example.

Requirements

Supported toolchains (make variable 'TOOLCHAIN')

  • GNU Arm® Embedded Compiler v11.3.1 (GCC_ARM) - Default value of TOOLCHAIN
  • Arm® Compiler v6.16 (ARM)
  • IAR C/C++ Compiler v9.30.1 (IAR)

Supported kits (make variable 'TARGET')

Hardware setup

This example uses the board's default configuration. See the kit user guide to ensure that the board is configured correctly.

Note: Some of the PSoC™ 4 kits ship with KitProg2 installed. The ModusToolbox™ software requires KitProg3. Before using this code example, make sure that the board is upgraded to KitProg3. The tool and instructions are available in the Firmware Loader GitHub repository. If you do not upgrade, you will see an error like "unable to find CMSIS-DAP device" or "KitProg firmware is out of date".

Software setup

This example requires no additional software or tools.

Using the code example

Create the project

The ModusToolbox™ tools package provides the Project Creator as both a GUI tool and a command line tool.

Use Project Creator GUI
  1. Open the Project Creator GUI tool.

    There are several ways to do this, including launching it from the dashboard or from inside the Eclipse IDE. For more details, see the Project Creator user guide (locally available at {ModusToolbox™ install directory}/tools_{version}/project-creator/docs/project-creator.pdf).

  2. On the Choose Board Support Package (BSP) page, select a kit supported by this code example. See Supported kits.

    Note: To use this code example for a kit not listed here, you may need to update the source files. If the kit does not have the required resources, the application may not work.

  3. On the Select Application page:

    a. Select the Applications(s) Root Path and the Target IDE.

    Note: Depending on how you open the Project Creator tool, these fields may be pre-selected for you.

    b. Select this code example from the list by enabling its check box.

    Note: You can narrow the list of displayed examples by typing in the filter box.

    c. (Optional) Change the suggested New Application Name and New BSP Name.

    d. Click Create to complete the application creation process.

Use Project Creator CLI

The 'project-creator-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 {ModusToolbox™ install directory}/tools_{version}/project-creator/ directory.

Use a CLI terminal to invoke the 'project-creator-cli' tool. On Windows, use the command-line 'modus-shell' program provided in the ModusToolbox™ installation instead of a standard Windows command-line application. This shell provides access to all ModusToolbox™ tools. You can access it by typing "modus-shell" in the search box in the Windows menu. In Linux and macOS, you can use any terminal application.

The following example clones the "mtb-example-psoc4-capsense-smartsense-buttons-slider" application with the desired name "CapsenseSmartsenseButtonsSlider" configured for the CY8CKIT-149 BSP into the specified working directory, C:/mtb_projects:

project-creator-cli --board-id CY8CKIT-149 --app-id mtb-example-psoc4-capsense-smartsense-buttons-slider --user-app-name CapsenseSmartsenseButtonsSlider --target-dir "C:/mtb_projects"

The 'project-creator-cli' tool has the following arguments:

Argument Description Required/optional
--board-id Defined in the field of the BSP manifest Required
--app-id Defined in the field of the CE manifest Required
--target-dir Specify the directory in which the application is to be created if you prefer not to use the default current working directory Optional
--user-app-name Specify the name of the application if you prefer to have a name other than the example's default name Optional

Note: The project-creator-cli tool uses the git clone and make getlibs commands to fetch the repository and import the required libraries. For details, see the "Project creator tools" section of the ModusToolbox™ tools package user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mtb_user_guide.pdf).

Open the project

After the project has been created, you can open it in your preferred development environment.

Eclipse IDE

If you opened the Project Creator tool from the included Eclipse IDE, the project will open in Eclipse automatically.

For more details, see the Eclipse IDE for ModusToolbox™ user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mt_ide_user_guide.pdf).

Visual Studio (VS) Code

Launch VS Code manually, and then open the generated {project-name}.code-workspace file located in the project directory.

For more details, see the Visual Studio Code for ModusToolbox™ user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mt_vscode_user_guide.pdf).

Keil µVision

Double-click the generated {project-name}.cprj file to launch the Keil µVision IDE.

For more details, see the Keil µVision for ModusToolbox™ user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mt_uvision_user_guide.pdf).

IAR Embedded Workbench

Open IAR Embedded Workbench manually, and create a new project. Then select the generated {project-name}.ipcf file located in the project directory.

For more details, see the IAR Embedded Workbench for ModusToolbox™ user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mt_iar_user_guide.pdf).

Command line

If you prefer to use the CLI, open the appropriate terminal, and navigate to the project directory. On Windows, use the command-line 'modus-shell' program; on Linux and macOS, you can use any terminal application. From there, you can run various make commands.

For more details, see the ModusToolbox™ tools package user guide (locally available at {ModusToolbox™ install directory}/docs_{version}/mtb_user_guide.pdf).

Operation

The following steps explain the tuning procedure. Because the project already has the necessary settings by default, you can skip this procedure and go to Testing the basic operation to verify the operation. To understand the tuning process and follow the steps for this kit or your own board, see Tuning procedure.

Note: For more details on SmartSense, see the "SmartSense full auto-tune" section in the PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide.

Tuning procedure

SmartSense is a CAPSENSE™ tuning method that automatically sets sensing parameters for optimal performance based on user-specified Finger capacitance (pF) values and continuously compensates for system, manufacturing, and environmental changes. In SmartSense Full Auto-tune mode, the only parameter that needs to be tuned by the user is the Finger capacitance (pF) parameter. The Finger capacitance (pF) parameter indicates the minimum value of Finger capacitance (pF) that should be detected as a valid touch by the CAPSENSE™ widget.

Note: Even for the SmartSense auto-tuning, the CAPSENSE™ allows manual configuration of some general parameters like enabling and disabling of compensation IDAC, filters, shield such as liquid-tolerance related parameters and modulator clock. These can be left at their default values for most cases or configured based on the requirements.

Tuning button widgets

Figure 1. CSD button widgets tuning flow

Do the following to tune the slider:

Stage 1: Select the highest Finger capacitance (pF) value
  1. Connect to CAPSENSE™ tuner by following the steps in the Testing the basic operation section.

  2. Select the Button0, Button1, and Button2 checkboxes and select Synchronized under Read mode and then navigate to Graph View as shown in Figure 2.

    The Graph View shows the raw counts and baseline for Button0, Button1, and Button2 in the Sensor data window. Ensure that the Raw counts and Baseline checkboxes are selected to view the sensor data.

    Figure 2. CAPSENSE™ tuner graph view

  3. In the Widget hardware parameters section, select Finger capacitance (pF) value as '1' (highest Finger capacitance (pF)) and click on Apply to device symbol to apply the changes to the device as shown in Figure 3.

    Figure 3. CAPSENSE™ Widget hardware parameters

    Note: The valid range of Finger capacitance (pF) is 0.1 to 1.

Stage 2: Coarse tuning
  1. Measure the signal and calculate the SNR.

    1. Switch to the SNR Measurement tab for measuring the SNR and to verify that the SNR is above 5:1, select Button0 and Button0_Sns0 sensor, and then click Acquire Noise as shown in Figure 4.

      Figure 4. CAPSENSE™ tuner - SNR measurement: acquire noise

    2. Once the noise is acquired, place the finger at a position on the button and then click Acquire Signal. Ensure that the finger remains on the button as long as the signal acquisition is in progress. Observe that the SNR is above 5:1.

      The calculated SNR on this button is displayed, as shown in Figure 5. Based on your end system design, test the signal with a finger that matches the size of your normal use case. Typically, the finger size targets are ~ 8 to 9 mm. Consider testing with smaller sizes that should be rejected by the system to ensure that they do not reach the finger threshold.

      Figure 5. CAPSENSE™ tuner - SNR measurement: acquire signal

  2. Is SNR > 5:1 and does sensor status change to '1' on touch?

    1. Switch to the Graph View tab to verify the status change. Place the finger at a position on the button and see the status graph.

      Observe there is no change in the status signal for Finger capacitance (pF) value '1' as shown in Figure 6.

      Figure 6. CAPSENSE™ tuner - status signal

    2. For Finger capacitance (pF) value '1', SNR > 5:1 but the status signal is '0'' on touch.

  3. Choose the next lower value of Finger capacitance (pF).

    1. If the Finger capacitance (pF) value does not satify the both conditions (SNR > 5:1 & sensor status change to '1' on touch), choose the next lower value of Finger capacitance (pF).

    2. Repeat step 1 and step 2 in coarse-tuning process and verify both the conditions.

    3. Repeat step 3 until both conditions are satisfied.

      For this case, both conditions are satisfied for the Finger capacitance (pF) value 0.50, as shown in Figure 7 and Figure 8.

      Figure 7. CAPSENSE™ tuner - Status signal

      Figure 8. CAPSENSE™ tuner - SNR measurement

    Note: Coarse-tuning satisfies the requirements of most designs, but fine-tuning allows you to choose the most efficient CAPSENSE™ parameters (i.e., minimum sensor scan time) using the SmartSense.

Stage 3: Fine tuning
  1. Choose the next higher value of Finger capacitance (pF).

    The next higher value of Finger capacitance (pF) is '0.60'. Change the Finger capacitance (pF) value to 0.50 to 0.60 and click on Apply to device, as shown in Figure 9.

    Figure 9. CAPSENSE™ Apply to device button

  2. Measure the signal and calculate the SNR.

    1. Follow the same procedure explained in coarse-tuning step 1 to measure the SNR.
  3. Is SNR > 5:1 and does sensor status change to 1 on touch?

    1. Follow the same procedure explained in coarse tuning step 2 and verify the conditions.
  4. Choose the Finger capacitance (pF) value.

    1. If the Finger capacitance (pF) value does not satisfy the conditions in step 3, skip to step 5.

    2. If the Finger capacitance (pF) value satisfy the conditions in step 3, choose that Finger capacitance (pF) value.

  5. Decrease the Finger capacitance (pF) to a value in between the current and the next lower available value.

    The next lowest value between 0.60 and 0.50 is '0.59'. Change the Finger capacitance (pF) value to 0.59 and click on Apply to device button as shown in Figure 9.

  6. Repeat the step 2, step 3 and step 4 for optimal Finger capacitance (pF) value.

    After following the steps the optimal value of Finger capacitance (pF) for Button0 is '0.53'.

Repeat the entire tuning process for Button1 and Button2.

Note: For CY8CKIT-045S, only one button (Button0) is present.

Note: The following tuning steps are done on CY8CKIT-149. Follow the same tuning procedure for CY8CKIT-145-40XX and CY8CKIT-045S kits.

The optimal Finger capacitance (pF) values after tuning is:

Widget CY8CKIT-149 CY8CKIT-145-40XX CY8CKIT-045S
Button0 0.53 1 0.12
Button1 0.35 0.79 -
Button2 0.26 0.57 -

Tuning slider widgets

Figure 10. CSD slider widget tuning flow

Note:

* To review the slider design, see the Slider design section in the Design considerations chapter in the PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide.

** To do manual tuning, see the Manual tuning section in the CAPSENSE™ performance tuning chapter in the PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide.

Do the following to tune the slider:

Stage 1: Set the Finger capacitance (pF) value to the maximum allowed
  1. Connect to CAPSENSE™ tuner by following the steps in Testing the basic operation section.

  2. Select the LinearSlider0 checkbox and select Synchronized under Read mode, and then navigate to Graph View as shown in Figure 11.

    The Graph View shows the raw counts and baseline for LinearSlider0 in the Sensor data window. Ensure that the Raw counts and Baseline checkboxes are selected to view the sensor data.

    Figure 11. CAPSENSE™ tuner graph view

  3. In the Widget hardware parameters section select Finger capacitance (pF) value as '1' (highest Finger capacitance (pF)) and Click on Apply to device symbol to apply the changes to the device as shown in Figure 12.

    Figure 12. CAPSENSE™ Widget hardware parameters

    Note: The valid range of Finger capacitance (pF) is 0.1 to '1'.

Stage 2: Slide finger over the slider and monitor the difference count i.e., Sensor Signal

Observe the Sensor Signal in Graph View section (see Figure 13) while sliding the finger. There is no change in the Sensor Signal for Finger capacitance (pF) value '1'.

Figure 13. CAPSENSE™ Sensor Signal

Stage 3: At any finger position, do at least two slider segments provide difference count (Sensor Signal > 0)?

At any finger position, if at least two slider segments provides Sensor Signal > 0 , Skip to stage 4. If not, continue the process.

  1. Is Finger capacitance (pF) >= minimum allowed Finger capacitance (pF) value?

    The minimum allowed Finger capacitance (pF) value is '0.1'. Check the given Finger capacitance (pF) value is >= 0.1.

    If the value is less than 0.1, End the tuning process.

    A hardware change may be required. Review slider design* or use manual tuning**.

    If the value is not less than 0.1, continue the process.

  2. Decrease Finger capacitance (pF) value by one unit.

    1. Decrease the Finger capacitance (pF) value by one unit in Widget hardware parameters section and click on Apply to device symbol to apply the changes to the device as shown in Figure 14.

      Figure 14. CAPSENSE™ Graph view

    2. Repeat the process from Stage 2.

Stage 4: At any finger position, atleast one slider segment provides an SNR > 5:1 and sensor signal > 50?
  1. Measure the signal, calculate the SNR and verify SNR > 5:1.

    1. Switch to the SNR Measurement tab for measuring the SNR and to verify that the SNR is above 5:1, select LinearSlider0, LinearSlider0_Sns0 sensor, and then click Acquire Noise as shown in Figure 15.

      Figure 15. CAPSENSE™ tuner - SNR measurement: acquire noise

    2. Once the noise is acquired, place the finger at a position on the selected Linear Slider sensor and then click Acquire Signal. Ensure that the finger remains on the Linear Slider sensor as long as the signal acquisition is in progress and observe the SNR.

      The calculated SNR on this LinearSlider0 is displayed, as shown in Figure 16. Based on your end system design, test the signal with a finger that matches the size of your normal use case. Typically, finger size targets are ~8 to 9 mm. Consider testing with smaller sizes that should be rejected by the system to ensure that they do not reach the finger threshold.

      Figure 16. CAPSENSE™ tuner - SNR measurement: acquire signal

  2. Verify sensor signal > 50?

    1. Switch to the Graph View tab to verify the sensor signal. Place the finger at a position on the LinearSlider sensor and see the status graph.

      Observe there is no change in the sensor signal for Finger capacitance (pF) value is 0.9, as shown in Figure 17.

      Figure 17. CAPSENSE™ tuner - Status signal

  3. Repeat step 1 and step 2 for LinearSlider0_Sns1, LinearSlider0_Sns2, LinearSlider0_Sns3, LinearSlider0_Sns4 and LinearSlider0_Sns5.

    Note: For CY8CKIT-145-40XX and CY8CKIT-045S kits, only five slider segments present (LinearSlider0_Sns0, LinearSlider0_Sns1, LinearSlider0_Sns2, LinearSlider0_Sns3, and LinearSlider0_Sns4).

  4. If at any finger position, at least one slider segment provides an SNR > 5:1 and sensor signal > 50 choose that Finger capacitance (pF).

    By following the above process at Finger capacitance (pF) value is 0.2, satisfies both the conditions as shown in the Figure 18 and Figure 19

    Figure 18. CAPSENSE™ tuner - LinearSlider Sensor signal

    Figure 19. CAPSENSE™ tuner - LinearSlider SNR measurement

  5. If both conditions did not satisfy, Skip to stage 3. Repeat the process from stage 3.

Note: The following tuning steps are done on CY8CKIT-149. Follow the same tuning procedure for CY8CKIT-145-40XX and CY8CKIT-045S kits.

The optimal Finger capacitance (pF) values after tuning is:

Widget CY8CKIT-149 CY8CKIT-145-40XX CY8CKIT-045S
LinearSlider0 0.2 0.7 0.48

Testing the basic operation

  1. Connect the board to your PC using the provided micro-USB cable through the KitProg3 USB connector.

  2. Program the board using one of the following:

    Using Eclipse IDE
    1. Select the application project in the Project Explorer.

    2. In the Quick Panel, scroll down, and click <Application Name> Program (KitProg3_MiniProg4).

    In other IDEs

    Follow the instructions in your preferred IDE.

    Using CLI

    From the terminal, execute the make program command to build and program the application using the default toolchain to the default target. The default toolchain is specified in the application's Makefile but you can override this value manually:

    make program TOOLCHAIN=<toolchain>
    

    Example:

    make program TOOLCHAIN=GCC_ARM
    

    After programming, the application starts automatically.

  3. Launch the CAPSENSE™ tuner to monitor the CAPSENSE™ data and for CAPSENSE™ parameter tuning, and SNR measurement.

    See the CAPSENSE™ Tuner guide for step-by-step instructions on how to launch and configure the CAPSENSE™ Tuner in the ModusToolbox™ software.

  4. Go to Tools > Tuner Communication Setup and set the parameters as shown in Figure 20. Click OK.

    Figure 20. Tuner Communication Setup

  5. Click Connect.

    Figure 21. CAPSENSE™ tuner window

  6. Click Start.

    Figure 22. CAPSENSE™ tuner start

    The Widget/Sensor Parameters tab gets updated with the parameters configured in the CAPSENSE™ Configurator window.

    Figure 23. CAPSENSE™ tuner window

  7. Observe the Widget/Sensor Parameters section in the CAPSENSE™ tuner window.

  8. Touch the CAPSENSE™ buttons and slide your finger over the CAPSENSE™ linear slider. Observe the status signal change to 0 to 1 on touch.

Debugging

You can debug the example to step through the code.

In Eclipse IDE

Use the <Application Name> Debug (KitProg3_MiniProg4) configuration in the Quick Panel. For details, see the "Program and debug" section in the Eclipse IDE for ModusToolbox™ user guide.

In other IDEs

Follow the instructions in your preferred IDE.

Design and implementation

The project uses the CAPSENSE™ middleware (see ModusToolbox™ software user guide for more details on selecting the middleware). See AN85951 – PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide for more details on CAPSENSE™ features and usage.

The design has a CSD-based, three buttons, CAPSENSE™ slider, and EZI2C peripheral. The EZI2C slave peripheral is used to monitor the sensor data of buttons, slider and slider touch position information on a PC using the CAPSENSE™ tuner available in the Eclipse IDE for ModusToolbox™ via I2C communication.

The code scans the widgets using the CSD sensing method and sends the CAPSENSE™ raw data over an I2C interface to the CAPSENSE™ tuner GUI tool on a PC using the on-board KitProg USB-I2C bridge.

Resources and settings

  1. Connect the board to your PC using the provided USB cable through the KitProg3 USB connector.

  2. Launch the CAPSENSE™ configurator tool.

    The CAPSENSE™ configurator tool can be launched in Eclipse IDE for ModusToolbox™ from the 'CSD peripheral' setting in the device configurator or in stand-alone mode directly from the Project Explorer.

    See the ModusToolbox™ CAPSENSE™ configurator tool guide for step-by-step instructions on how to configure and launch CAPSENSE™ in the ModusToolbox™ software.

  3. In the Basic tab, a single slider LinearSlider0 and three buttons (Button0, Button1 and Button2) are configured as a CSD (Self-cap), and the CSD tuning mode is configured as SmartSense (Full Auto-Tune).

    Figure 24. CAPSENSE™ configurator - Basic tab

  4. Do the following in the General sub-tab under the Advanced tab:

    Figure 25. CAPSENSE™ configurator - General sub-tab in Advanced Tab

  5. Go to the CSD Settings tab and make the following changes:

    • Select Enable compensation IDAC.

      Figure 26. CAPSENSE™ configurator - CSD settings sub-tab in Advanced Tab

  6. Go to the Widget Details tab. Set all the parameters with SmartSense.

    Figure 27. CAPSENSE™ configurator - widget details in advanced tab

  7. Go to the Pins tab. Connect the pins as shown in Figure 28.

    Figure 28. CAPSENSE™ configurator - Pins Tab

  8. Click Save to apply the settings.

  1. Connect the board to your PC using the provided USB cable through the KitProg3 USB connector.

  2. Launch the CAPSENSE™ configurator tool.

    The CAPSENSE™ configurator tool can be launched in Eclipse IDE for ModusToolbox™ from the 'CSD peripheral' setting in the device configurator or in stand-alone mode directly from the Project Explorer.

    See the ModusToolbox™ CAPSENSE™ configurator tool guide for step-by-step instructions on how to configure and launch CAPSENSE™ in the ModusToolbox™ software.

  3. In the Basic tab, a single slider LinearSlider0 and three buttons (Button0, Button1, and Button2) are configured as a CSD (Self-cap), and the CSD tuning mode is configured as SmartSense (Full Auto-Tune).

    Figure 29. CAPSENSE™ configurator - basic tab

  4. Do the following in the General sub-tab under the Advanced tab:

    Figure 30. CAPSENSE™ configurator - general sub-tab in advanced Tab

  5. Go to the CSD Settings tab and make the following changes:

    • Select Enable compensation IDAC.

      Figure 31. CAPSENSE™ configurator - CSD settings sub-tab in Advanced Tab

  6. Go to the Widget Details tab. Set all the parameters with SmartSense.

    Figure 32. CAPSENSE™ configurator - widget details in advanced tab

  7. Go to the Pins tab. Connect the pins as shown in Figure 33.

    Figure 33. CAPSENSE™ configurator - pins tab

  8. Click Save to apply the settings.

  1. Connect the board to your PC using the provided USB cable through the KitProg3 USB connector.

  2. Launch the CAPSENSE™ configurator tool.

    The CAPSENSE™ configurator tool can be launched in Eclipse IDE for ModusToolbox™ software from the 'CSD peripheral' setting in the device configurator or in stand-alone mode directly from the Project Explorer.

    See the ModusToolbox™ CAPSENSE™ configurator tool guide for step-by-step instructions on how to configure and launch CAPSENSE™ in the ModusToolbox™ software.

  3. In the Basic tab, a single slider LinearSlider0 and a button Button0 are configured as a CSD (Self-cap), and the CSD tuning mode is configured as SmartSense (Full Auto-Tune).

    Figure 34. CAPSENSE™ configurator - Basic tab

  4. Do the following in the General sub-tab under the Advanced tab:

    Figure 35. CAPSENSE™ configurator - General sub-tab in advanced tab

  5. Go to the CSD Settings tab and make the following changes:

    • Select Enable compensation IDAC.

      Figure 36. CAPSENSE™ configurator - CSD settings sub-tab in advanced tab

  6. Go to the Widget Details tab. Set all the parameters with SmartSense.

    Figure 37. CAPSENSE™ configurator - widget details in advanced tab

  7. Go to the Pins tab. Connect the pins as shown in Figure 38.

    Figure 38. CAPSENSE™ configurator - pins tab

  8. Click Save to apply the settings.

Table 1. Application resources

Figure 39. Device configurator - EZI2C peripheral

Resource Alias/object Purpose
SCB (I2C) (PDL) CYBSP_EZI2C EZI2C slave driver to communicate with the CAPSENSE™ tuner
CAPSENSE™ CYBSP_CapSense CAPSENSE™ driver to interact with the CSD hardware and interface CAPSENSE™ sensors

Firmware flow

Figure 40. Firmware flowchart


Related resources

Resources Links
Application notes AN79953 – Getting started with PSoC™ 4
Code examples Using ModusToolbox™ software on GitHub
Using PSoC™ Creator
Device documentation PSoC™ 4 datasheets
PSoC™ 4 technical reference manuals
Development kits Select your kits from the Evaluation board finder page.
Libraries on GitHub mtb-pdl-cat2 – PSoC™ 4 Peripheral Driver Library (PDL)
mtb-hal-cat2 – Hardware abstraction layer (HAL) library
Middleware on GitHub capsense – CAPSENSE™ library and documents
Tools ModusToolbox™ software – ModusToolbox™ software is a collection of easy-to-use software and tools enabling rapid development with Infineon MCUs, covering applications from embedded sense and control to wireless and cloud-connected systems using AIROC™ Wi-Fi and Bluetooth® connectivity devices.
PSoC™ Creator – IDE for PSoC™ and FM0+ MCU development

Other resources

Infineon provides a wealth of data at www.infineon.com to help you select the right device, and quickly and effectively integrate it into your design.

Document history

Document title: CE237532 - PSoC™ 4: CAPSENSE™ SmartSense buttons slider

Version Description of change
1.0.0 New code example
1.1.0 Added support for CY8CKIT-045S


© Cypress Semiconductor Corporation, 2023. This document is the property of Cypress Semiconductor Corporation, an Infineon Technologies company, and its affiliates ("Cypress"). This document, including any software or firmware included or referenced in this document ("Software"), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress’s patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software is prohibited.
TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. No computing device can be absolutely secure. Therefore, despite security measures implemented in Cypress hardware or software products, Cypress shall have no liability arising out of any security breach, such as unauthorized access to or use of a Cypress product. CYPRESS DOES NOT REPRESENT, WARRANT, OR GUARANTEE THAT CYPRESS PRODUCTS, OR SYSTEMS CREATED USING CYPRESS PRODUCTS, WILL BE FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE, HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (collectively, "Security Breach"). Cypress disclaims any liability relating to any Security Breach, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from any Security Breach. In addition, the products described in these materials may contain design defects or errors known as errata which may cause the product to deviate from published specifications. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. "High-Risk Device" means any device or system whose failure could cause personal injury, death, or property damage. Examples of High-Risk Devices are weapons, nuclear installations, surgical implants, and other medical devices. "Critical Component" means any component of a High-Risk Device whose failure to perform can be reasonably expected to cause, directly or indirectly, the failure of the High-Risk Device, or to affect its safety or effectiveness. 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 any use of a Cypress product as a Critical Component in a High-Risk Device. You shall indemnify and hold Cypress, including its affiliates, and its directors, officers, employees, agents, distributors, and assigns harmless from and against all claims, costs, damages, and expenses, arising out of any claim, including claims for product liability, personal injury or death, or property damage arising from any use of a Cypress product as a Critical Component in a High-Risk Device. Cypress products are not intended or authorized for use as a Critical Component in any High-Risk Device except to the limited extent that (i) Cypress’s published data sheet for the product explicitly states Cypress has qualified the product for use in a specific High-Risk Device, or (ii) Cypress has given you advance written authorization to use the product as a Critical Component in the specific High-Risk Device and you have signed a separate indemnification agreement.
Cypress, the Cypress logo, and combinations thereof, WICED, ModusToolbox, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress or a subsidiary of Cypress in the United States or in other countries. For a more complete list of Cypress trademarks, visit www.infineon.com. Other names and brands may be claimed as property of their respective owners.