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.

CC1310: 使能和关闭 Sensor Controller设备设置,获得更低功耗

Part Number: CC1310

使用CC1310,其中使用了 Sensor Controller里的ADC,为了得到更低的休眠功耗,也需要在进入休眠前把Sensor controller 里的相关功能关闭,但醒来后,会出现再次初始化sensor controller设备不成功,导致异常。是我的程序哪里不对么,还是有其他方法?

void Sci_open(void)
{
   PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH | PRCM_DOMAIN_SERIAL);
   while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH | PRCM_DOMAIN_SERIAL)!= PRCM_DOMAIN_POWER_ON);

   ///* GPIO power */
   PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO);
   PRCMLoadSet();
   while (!PRCMLoadGet());
   
}	

///休眠关闭不使能SCI
void Scif_close(void)
{
   PRCMPeripheralRunDisable(PRCM_PERIPH_GPIO);
   PRCMLoadSet();
   //while (!PRCMLoadGet());
   
   PRCMPowerDomainOff(PRCM_DOMAIN_SERIAL | PRCM_DOMAIN_PERIPH);
   //while (PRCMPowerDomainStatus(PRCM_DOMAIN_SERIAL | PRCM_DOMAIN_PERIPH)!= PRCM_DOMAIN_POWER_OFF);
}	

  • 您好我们已收到您的问题并升级到英文论坛寻求帮助,如有答复将尽快回复您。谢谢!

  • 使用了 Sensor Controller里的ADC,如果进入休眠时,不将其关闭,休眠时还会产生几个uA的电流,将其不使能或者关闭后,就可以得到更低的功耗,但再次使能时会出现异常

  • 好的收到了哈,我们一起反馈给工程师看下。

  • 您好,

    关于功耗问题,请问使能 ADC 时的功耗是否已超出预期? 或者说sensor controller task本身的总体功耗是否超出预期?

    将其不使能或者关闭后,就可以得到更低的功耗,但再次使能时会出现异常

    您的意思是使用函数 adcDisable(),然后使用 adcEnableSync()再次使能 ADC。 当 ADC 被禁用时,可以看到低功耗,但调用 adcEnableSync()时却会出现异常对吗?您能否详细说明异常情况,或者发送 ADC 任务代码。

  • 现在设备休眠的功耗均值大概在4uA-8uA之间,当然它还会不停的在跳动。为了电池供电能维持更长久,希望能有更低功耗。

    我仅使用   PRCMPeripheralRunDisable(PRCM_PERIPH_GPIO);  和   PRCMPowerDomainOff(PRCM_DOMAIN_SERIAL | PRCM_DOMAIN_PERIPH); 将sensor controller不使能,的确获得更低的功耗,休眠时功耗大概在0.5uA-3uA 跳动;但运行、休眠几次后,就不再运行ADC任务了。ADC代码如下

    if(input.ntcflag==1){
        
        adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P73_MS, ADC_TRIGGER_MANUAL);
        
        // Select ADC input-------
        adcSelectGpioInput(cfg.pAuxioASensorOutput[0]);
        
        adcGenManualTrigger();
        adcReadFifo(output.pSamples[1]);
        
        ///Select Vdds-------------------------------
        adcSelectIntInput(ADC_INPUT_VDDS);
        
        adcGenManualTrigger();
        adcReadFifo(output.pSamples[2]);
        
        // Disable the ADC
        adcDisable();
        
    }
    
    // Schedule the next execution
    fwScheduleTask(5);

  • 好的我们跟进给工程师看下哈。

  •  您好,

    抱歉回复晚了,工程师这边做了一个测试:从4_20 SDK 中获取了empty示例,将其修改为进入standby状态并等待来自sensor controller的中断。 sensor controller每秒运行一个 ADC 任务,然后唤醒 MCU。

    主 MCU 和sensor controller的代码如下:

    /* Driver Header files */
    #include <ti/drivers/GPIO.h>
    
    #include "scif.h"
    
    #include <ti/sysbios/knl/Semaphore.h>
    #include <ti/sysbios/BIOS.h>
    
    /* Board Header file */
    #include "Board.h"
    
    static uint16_t ADCValue;
    
    Semaphore_Struct semADCValuesReady;
    Semaphore_Handle semADCValuesReadyHandle;
    
    void scTaskAlertCallback(void)
    {
        Semaphore_post(semADCValuesReadyHandle);
    }
    
    void *mainThread(void *arg0)
    {
        // Semaphore initialization
        Semaphore_Params semParams;
        Semaphore_Params_init(&semParams);
        Semaphore_construct(&semADCValuesReady, 0, &semParams);
        semADCValuesReadyHandle = Semaphore_handle(&semADCValuesReady);
    
        // Initializes the OSAL
        scifOsalInit();
    
        // Registers the task ALERT interrupt callback
        scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
    
        // Initializes the driver
        scifInit(&scifDriverSetup);
    
        scifStartRtcTicksNow(1*(0x00010000 / 1)); // Run SC code every 1 s
    
        scifStartTasksNbl((1 << (SCIF_ADC_TASK_ID)));
    
        while(1)
        {
            Semaphore_pend(semADCValuesReadyHandle, BIOS_WAIT_FOREVER);
    
            // Clear the ALERT interrupt source
            scifClearAlertIntSource();
    
            // Acknowledge the ALERT event
            scifAckAlertEvents();
    
            ADCValue = scifTaskData.adc.output.adcValue;
        }
    }

    adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P7_US, ADC_TRIGGER_MANUAL);
    
    // Selects ADCPIN as input for the ADC
    adcSelectGpioInput(AUXIO_A_ADCPIN);
    adcGenManualTrigger();
    adcReadFifo(output.adcValue);
    
    // Disable the ADC
    adcDisable();
    
    // Wake up MCU
    fwGenAlertInterrupt();
    
    // Schedule the next execution
    fwScheduleTask(1);

    CC1310在standby时使用此代码的时间不到1us。