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:电容式触控功耗

Guru**** 1807890 points
Other Parts Discussed in Thread: BOOSTXL-ULPSENSE
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1431385/lp-em-cc1354p10-capacitive-touch-power-consumption

器件型号:LP-EM-CC1354P10
主题中讨论的其他器件:BOOSTXL-ULPSENSE

工具与软件:

您好!

我将以 CC1354的电容式触控为例、在"采用 CC13x2/CC26x2的超低功耗感应应用"文档中、它提到了不采用触控的8.1uA 电流和采用触控的128uA 电流、

我用 Sensor Controller Studio 中的示例尝试了这种情况,并使用 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;
}


我将 XDS110与 MSP CapTIvate MCU 板一起用于电容测试、不幸的是、我无法实现8或120 uA 的功效:



我在配置中缺少什么吗?

此致、

Valentin Künti ć

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好

    https://www.ti.com/lit/swra578中提到的电流消耗 是在连接到 BOOSTXL-ULPSENSE 板的 CC13x2 LP 上测量的。

    它在传感器控制器上运行默认的"Capacitive Touch for ULPSENSE"示例、并在您找到 SCS 安装位置的"cap_touch_ulpsense"示例

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

    您正在使用 MSP CapTIvate MCU 开发套件、我甚至不知道您的 CC1354 LP 是如何连接到此套件的

    此外、在您的应用中、您要将电容触摸参数从其默认值中覆盖、并且在等待 SC 中断时不会将 CC1343置于待机状态、就像在最初的示例中所做的那样。

    要能够重新创建相同的电流、您需要在同一硬件上运行相同的软件。 验证可以重新生成结果之后、您可以开始修改软件、更改硬件等

    很抱歉、我无法更好地回答您为什么不能得到相同的当前数字。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您的响应、

    抱歉、我没有提到如何通过将导线直接连接到 CC1354引脚来连接 CapTIvate 套件。

    对于待机模式、是否可以将设备置于待机模式? 我在文档中看到没有建议在应用程序中直接使用"power_sleep ()"的提及、因为该应用程序被电源策略(在我的器件上处于活动状态)调用、并且器件与我在使用调试模式时看到的情况一样正确进入睡眠状态。

    感谢您提供示例路径、我将尝试在代码中实现信标来处理传感器控制器警报。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    只要没有其他任务正在运行、信号量上的挂起将使 MCU 进入待机状态:

    Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);

    Siri