This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-EM-CC1354P10: Capacitive touch power consumption

Part Number: LP-EM-CC1354P10
Other Parts Discussed in Thread: BOOSTXL-ULPSENSE

Tool/software:

Hello,

I'm looking at the example for the capacitive touch of CC1354, in the "Ultra-Low Power Sensing Applications With CC13x2/CC26x2" Documentation it's mentioned 8.1uA without touch and 128uA with touch,

I've tried this case with the example in the Sensor Controller Studio and implement it very simply in a empty pro jet with CCS Theia :

/*
 * Copyright (c) 2015-2019, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 *  ======== empty.c ========
 */
/* For usleep() */
#include <unistd.h>
#include <stdint.h>
#include <stddef.h>


/* Driver Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/apps/LED.h>
#include "ti_drivers_config.h"
#include "C:\Users\ValentinKUNTI\Documents\Texas Instruments\Sensor Controller Studio\examples\cap_touch_ulpsense\source\scif.h"

// SCIF driver callbacks
void scCtrlReadyCallback(void) {
    // Empty callback for task control interface ready
}

void scTaskAlertCallback(void) {
    // Handle alert interrupt from Sensor Controller
    scifClearAlertIntSource();
    scifAckAlertEvents();
}

void *mainThread(void *arg0) {
    // Array to store touch detection state for each pin
    uint16_t touchState[SCIF_CAPACITIVE_TOUCH_PIN_COUNT] = {0};
    LED_Handle led0Handle = LED_open(CONFIG_LED_0, NULL);
    
    // Initialize drivers
    GPIO_init();
    
    // Initialize SCIF
    scifOsalInit();
    scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
    scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
    scifInit(&scifDriverSetup);
    
    // Configure capacitive touch parameters
    scifTaskData.capacitiveTouch.cfg.isrcCurrent = 0x0011;     // Set current for touch sensing
    scifTaskData.capacitiveTouch.cfg.maxSmplPeriod = 100;      // Maximum sampling period
    scifTaskData.capacitiveTouch.cfg.minSmplPeriod = 30;       // Minimum sampling period
    
    // Reset task structures (except configuration)
    scifResetTaskStructs(1 << SCIF_CAPACITIVE_TOUCH_TASK_ID, 
                        (1 << SCIF_STRUCT_INPUT) | (1 << SCIF_STRUCT_OUTPUT));
    
    // Start the Capacitive Touch task
    if (scifWaitOnNbl(20000) != SCIF_SUCCESS) {
        // Handle timeout error
        return NULL;
    }
    
    if (scifStartTasksNbl(1 << SCIF_CAPACITIVE_TOUCH_TASK_ID) != SCIF_SUCCESS) {
        // Handle start error
        return NULL;
    }
    
    // Main loop
    while (1) {
        // Check for available output data
        while (scifGetTaskIoStructAvailCount(SCIF_CAPACITIVE_TOUCH_TASK_ID, SCIF_STRUCT_OUTPUT) > 0) {
            // Get pointer to output structure
            SCIF_CAPACITIVE_TOUCH_OUTPUT_T* output = scifGetTaskStruct(SCIF_CAPACITIVE_TOUCH_TASK_ID, SCIF_STRUCT_OUTPUT);
            
            // Read touch detection state
            for (int i = 0; i < SCIF_CAPACITIVE_TOUCH_PIN_COUNT; i++) {
                touchState[i] = output->pTouchDet[i];
            }
            
            // Return the buffer to the Sensor Controller
            scifHandoffTaskStruct(SCIF_CAPACITIVE_TOUCH_TASK_ID, SCIF_STRUCT_OUTPUT);
        }
        
        // Toggle LED based on touch state of first pin
        if (touchState[0]) {
            LED_toggle(led0Handle);
        }
        
        // Small delay
        sleep(1);
    }
    
    return NULL;
}


I use the XDS110, with the MSP CapTIvate MCUS board for capacitive testing, unfortunately I can't achieve the 8 or 120 uA power efficiency :



Am I missing something for the configuration ?

Best regards,

Valentin Künti

  • Hi

    The current consumption referred to in https://www.ti.com/lit/swra578 is measured on a CC13x2 LP connected to a BOOSTXL-ULPSENSE board.

    It run the default “Capacitive Touch for ULPSENSE” example on the sensor controller, and the “cap_touch_ulpsense“ example that you find where you have installed SCS

    (C:\Program Files (x86)\Texas Instruments\Sensor Controller Studio\examples\cap_touch_ulpsense)

    You are using the MSP CapTIvate MCU development kit, and I do not even know how your CC1354 LP is connected to this kit.

    Also in your application you are overwriting the capacitive touch parameters from its default values, and you are not putting the CC1343 in Standby while waiting for an interrupt from the SC, like is done in the original example.

    To be able to re-create the same current, you need to run the same SW on the same HW. Once you have verified that you can re-produce the results you can start modifying you SW, changing the HW etc.

    I am sorry that I am not able to give you better answer as to why you are not getting the same current numbers.

  • Thank you for the response,

    Sorry I didn't mention how I connect the captivate kit with wire connected directly to the CC1354 PIN.

    For the standby mode is there way to put the device in ? I've seen in the documentation the mention that is not recommanded to use "power_sleep()" directly in the application cause this one is called by the power policy ( which is active on my device) and the device go to sleep correctly of what I've seen using debug mode.

    Thank you for providing the path to the example I will try to implement semaphore in my code to handle the sensor controller Alert.

  • pending on the semaphore will take the MCU to standby as long as there are no other tasks running:

    Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);

    Siri