| .. zephyr:code-sample:: rtk0eg0019b01002bj |
| :name: RTK0EG0019B01002BJ Capacitive Touch Application Shield |
| :relevant-api: input_interface renesas_ra_ctsu_interface |
| |
| Interact with the Capacitive Touch Sensor and LED matrix on the RTK0EG0019B01002BJ shield |
| |
| Overview |
| ******** |
| |
| This sample demonstrates the usage of the Capacitive Touch Sensor using the |
| :ref:`rtk0eg0019b01002bj` with `Renesas Capacitive Touch Sensor Solutions`_. |
| |
| Requirements |
| ************ |
| |
| A Renesas Capacitive Touch Evaluation Kit is needed to run this sample. It includes: |
| |
| - A MCU board which support CTSU driver (for example: RSSK-RA2L1). |
| - A RTK0EG0019B01002BJ Touch Application board. |
| |
| Building and Running |
| ******************** |
| |
| Build and flash with default settings for shield |
| ================================================ |
| The :ref:`rtk0eg0019b01002bj` comes with a default DTS configuration that is tuned in advance to |
| make it ready for development. |
| |
| Build and flash as follows, changing ``rssk_ra2l1`` for your board: |
| |
| .. zephyr-app-commands:: |
| :zephyr-app: samples/shields/rtk0eg0019b01002bj |
| :board: rssk_ra2l1 |
| :shield: rtk0eg0019b01002bj |
| :goals: build flash |
| :compact: |
| |
| After startup, all LEDs on the shield will blink 5 times to indicate that the |
| application has started. |
| |
| You can monitor input events through the console output. Additionally, the LED |
| corresponding to the touched sensor will turn on when you touch it. |
| |
| .. code-block:: console |
| |
| *** Booting Zephyr OS build v4.1.0-6697-gdc27367ff627 *** |
| rtk0eg0019b01002bj sample started |
| I: input event: dev=button1 type= 1 code= 11 value=0 |
| I: input event: dev=wheel type= 3 code= 8 value=61 |
| I: input event: dev=wheel type= 3 code= 8 value=67 |
| I: input event: dev=wheel type= 3 code= 8 value=82 |
| I: input event: dev=wheel type= 3 code= 8 value=111 |
| I: input event: dev=wheel type= 3 code= 8 value=124 |
| I: input event: dev=wheel type= 3 code= 8 value=134 |
| I: input event: dev=slider type= 3 code= 6 value=0 |
| I: input event: dev=slider type= 3 code= 6 value=2 |
| I: input event: dev=slider type= 3 code= 6 value=4 |
| I: input event: dev=slider type= 3 code= 6 value=6 |
| I: input event: dev=slider type= 3 code= 6 value=10 |
| I: input event: dev=slider type= 3 code= 6 value=23 |
| I: input event: dev=slider type= 3 code= 6 value=26 |
| I: input event: dev=slider type= 3 code= 6 value=27 |
| I: input event: dev=slider type= 3 code= 6 value=28 |
| |
| (Advanced) Using Configuration Output Generated by Renesas QE Capacitive Touch Workflow |
| ======================================================================================= |
| This section is for advanced users who do not want to use the default configuration for the Cap |
| Touch shield and would like to tune configuration parameters manually themselves using the |
| `Renesas Development Assistance Tool for Capacitive Touch Sensors`_. |
| |
| Requirements |
| ------------ |
| |
| - `e² studio`_ with Renesas QE Capacitive Touch plugin installed: recommended 2025-04.1 version |
| - `RA Flexible Software Package`_: recommended FSP v5.8.0 or newer |
| |
| Building and flashing with generated tuning code |
| ------------------------------------------------ |
| |
| 1. Follow steps 6.1 to 6.5 of `Using QE and FSP to Develop Capacitive Touch Applications`_. |
| |
| 2. At step 8 in 6.5 Tuning the Capacitive Touch Interface Using QE for Capacitive Touch Plug-in, |
| select 'Specify an output folder' and choose this application's subfolder. |
| |
| 3. Update the include path to qe_touch_config.h and qe_touch_define.h, and add qe_touch_config.c |
| to the build sources in your application's CMake. |
| |
| 4. Build and flash the application with the command below: |
| |
| .. zephyr-app-commands:: |
| :zephyr-app: samples/shields/rtk0eg0019b01002bj |
| :board: rssk_ra2l1 |
| :shield: rtk0eg0019b01002bj |
| :gen-args: -DCONFIG_INPUT_RENESAS_RA_QE_TOUCH_CFG=y |
| :goals: build flash |
| :compact: |
| |
| References |
| ********** |
| - `Renesas Capacitive Touch Sensor Solutions`_ |
| - `Renesas Development Assistance Tool for Capacitive Touch Sensors`_ |
| |
| .. _Renesas Capacitive Touch Sensor Solutions: |
| https://www.renesas.com/en/key-technologies/hmi/capacitive-touch-sensor-solutions |
| |
| .. _Renesas Development Assistance Tool for Capacitive Touch Sensors: |
| https://www.renesas.com/en/software-tool/qe-capacitive-touch-development-assistance-tool-capacitive-touch-sensors |
| |
| .. _Using QE and FSP to Develop Capacitive Touch Applications: |
| https://www.renesas.com/en/document/apn/using-qe-and-fsp-develop-capacitive-touch-applications?r=1170071 |
| |
| .. _e² studio: |
| https://www.renesas.com/en/software-tool/e-studio |
| |
| .. _RA Flexible Software Package: |
| https://www.renesas.com/en/software-tool/flexible-software-package |