RTK0EG0019B01002BJ Capacitive Touch Application Shield

Browse source code on GitHub

Overview

This sample demonstrates the usage of the Capacitive Touch Sensor using the RTK0EG0019B01002BJ Capacitive Touch Application Shield 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 RTK0EG0019B01002BJ Capacitive Touch Application Shield 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:

west build -b rssk_ra2l1 --shield rtk0eg0019b01002bj samples/shields/rtk0eg0019b01002bj
west flash

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.

*** 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

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.

  1. Build and flash the application with the command below:

west build -b rssk_ra2l1 --shield rtk0eg0019b01002bj samples/shields/rtk0eg0019b01002bj -- -DCONFIG_INPUT_RENESAS_RA_QE_TOUCH_CFG=y
west flash

References

See also

Input Interface
Renesas RA CTSU