1.1.7 How to create Low-power sensor
Overview
This section provides step by step information for generating Low power sensor using Touch Configurator in MCC.
Creating Low-power sensor
Step 1: Open Touch Configurator
Select MCC and open Touch Configurator in Resource Management (MCC) tab
Step 2: Create Low Power Sensor
Once the Touch Configurator is opened, in Create tab → Add the required number of Buttons/Sliders/Wheels. Select the required sensor and click Configure as Low power.
Step 3: Creating a Low-Power sensor
- Event System Driven Low-Power
To create Event System Driven Low Power, once the sensor is configured as Low power, open Touch Configurator → Configure → Low power → Configure Event System option will be checked by default.
Note: Event System Driven Low Power can be configured with only one Low-power sensor.Note: In case multiple sensors are selected while enabling Low Power, on enabling Configure event system, a dialog box appears indicating that only one sensor can be configured as low power sensor and provides an option to select the Low power sensor from a drop down.The following animation shows how to configure event system based low power sensor.
- Configuring Low-Power without
Event System
To create a Low Power sensor without Event system, open Touch Configurator → Configure → Low power → and uncheck Configure Event System
To configure Low Power parameters, select Configure tab → Low power option and the following parameters can be configured according to user requirements.
- Low Power Measurement Period
- Touch inactivity Timeout &
- Low Power Drift Wakeup
The details of each parameter can be seen by hovering the mouse over the parameter value drop downs in the configurator.
The following animation shows how to configure low power sensor without event system.
- Configuring Lump as
Low-Power
Initially, the required sensors are selected and lump is configured. A detailed description on creating a lump sensor is given in How to create Lump Sensor page.
Select the Lump Sensor and click Configure as Low Power.
Once the lump sensor is configured as Low power sensor, it can be setup with either Event system enabled or disabled as given in Section 2 and 3.
Update the specified hints in the Project files and the Devices Resources tab.
Enable SLPCTRL frm Device Resources
In Device Resources → System → Add SLPCTRL as below. It gets added in the Project Graph/Builder.
Step 5: Generate Low-power sensor code
Click Generate in Resource Management (MCC) tab.
Add touch_process() and call sleep instruction in the main → while() loop as shown.