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.

[参考译文] LAUNCHXL-CC1310:使用待机模式

Guru**** 2544090 points
Other Parts Discussed in Thread: CC1310, CC1190

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1007747/launchxl-cc1310-using-standby-mode

器件型号:LAUNCHXL-CC1310
主题中讨论的其他器件:CC1310TMP116CC1190

大家好。

我将引脚待机示例与 CC1310 LAUNCHXL 搭配使用以降低功耗  

数据表中  

它应该是0.6uA、但即使我已将未使用的引脚定义为 PIN_RELOADD、电流表上的电流读数也是1.6-1.7mA  

这是 pinStandby .c

/*
 * Copyright (c) 2016-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.
 */

/*
 *  ======== pinStandby.c ========
 */
#include <unistd.h>

/* Driver Header files */
#include <ti/drivers/PIN.h>

/* Example/Board Header files */
#include "Board.h"

/* Led pin table */
//PIN_Config LedPinTable[] =
//{
//    Board_PIN_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
//    Board_PIN_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
//    PIN_TERMINATE                                                                      /* Terminate list */
//};

/*
 *  ======== mainThread ========
 */
void *mainThread(void *arg0)
{
//    PIN_State   pinState;
//    PIN_Handle  hPin;
//    uint32_t    currentOutputVal;
    uint32_t    standbyDuration = 5;

    /* Allocate LED pins */
    //hPin = PIN_open(&pinState, LedPinTable);

    /*
     * Repeatedly sleeps for a duration, to allow repeated entry/exit
     * from standby. The LED states are toggled on each iteration
     */
    while(1) {
        /* Sleep, to let the power policy transition the device to standby */
        sleep(standbyDuration);

        /* Read current output value for all pins */
        //currentOutputVal =  PIN_getPortOutputValue(hPin);

        /* Toggle the LEDs, configuring all LEDs at once */
        //PIN_setPortOutputValue(hPin, ~currentOutputVal);
    }
}

main_tirtos.c  

/*
 * Copyright (c) 2016-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.
 */

/*
 *  ======== main_tirtos.c ========
 */
#include <stdint.h>

/* POSIX Header files */
#include <pthread.h>

/* RTOS header files */
#include <ti/sysbios/BIOS.h>

/* Example/Board Header files */
#include <ti/drivers/Board.h>

extern void *mainThread(void *arg0);

/* Stack size in bytes */
#define THREADSTACKSIZE    1024

/*
 *  ======== main ========
 */
int main(void)
{
    pthread_t           thread;
    pthread_attr_t      attrs;
    struct sched_param  priParam;
    int                 retc;

    /* Call driver init functions */
    Board_init();

    /* Initialize the attributes structure with default values */
    pthread_attr_init(&attrs);

    /* Set priority, detach state, and stack size attributes */
    priParam.sched_priority = 1;
    retc = pthread_attr_setschedparam(&attrs, &priParam);
    retc |= pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
    retc |= pthread_attr_setstacksize(&attrs, THREADSTACKSIZE);
    if (retc != 0) {
        /* failed to set attributes */
        while (1) {}
    }

    retc = pthread_create(&thread, &attrs, mainThread, NULL);
    if (retc != 0) {
        /* pthread_create() failed */
        while (1) {}
    }

    BIOS_start();

    return (0);
}

CC1310_LAUNCHXL.h

/*
 * 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.
 */
/** ============================================================================
 *  @file       CC1310_LAUNCHXL.h
 *
 *  @brief      CC1310 LaunchPad Board Specific header file.
 *
 *  The CC1310_LAUNCHXL header file should be included in an application as
 *  follows:
 *  @code
 *  #include "CC1310_LAUNCHXL.h"
 *  @endcode
 *
 *  ============================================================================
 */
#ifndef __CC1310_LAUNCHXL_BOARD_H__
#define __CC1310_LAUNCHXL_BOARD_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes */
#include <ti/drivers/PIN.h>
#include <ti/devices/cc13x0/driverlib/ioc.h>

/* Externs */
extern const PIN_Config BoardGpioInitTable[];

/* Defines */
#define CC1310_LAUNCHXL

/* Mapping of pins to board signals using general board aliases
 *      <board signal alias>                  <pin mapping>   <comments>
 */

/* Analog capable DIOs */
#define CC1310_LAUNCHXL_DIO23_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO24_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO25_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO26_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO27_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO28_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO29_ANALOG          PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO30_ANALOG          PIN_UNASSIGNED

/* Digital IOs */
#define CC1310_LAUNCHXL_DIO0                  PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO1                  PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO12                 PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO15                 PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO16_TDO             IOID_16
#define CC1310_LAUNCHXL_DIO17_TDI             IOID_17
#define CC1310_LAUNCHXL_DIO21                 PIN_UNASSIGNED
#define CC1310_LAUNCHXL_DIO22                 PIN_UNASSIGNED

/* Discrete Inputs */
#define CC1310_LAUNCHXL_PIN_BTN1              PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PIN_BTN2              PIN_UNASSIGNED

/* GPIO */
#define CC1310_LAUNCHXL_GPIO_LED_ON           1
#define CC1310_LAUNCHXL_GPIO_LED_OFF          0

/* I2C */
#define CC1310_LAUNCHXL_I2C0_SCL0             PIN_UNASSIGNED
#define CC1310_LAUNCHXL_I2C0_SDA0             PIN_UNASSIGNED

/* I2S */
#define CC1310_LAUNCHXL_I2S_ADO               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_I2S_ADI               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_I2S_BCLK              PIN_UNASSIGNED
#define CC1310_LAUNCHXL_I2S_MCLK              PIN_UNASSIGNED
#define CC1310_LAUNCHXL_I2S_WCLK              PIN_UNASSIGNED

/* LEDs */
#define CC1310_LAUNCHXL_PIN_LED_ON            1
#define CC1310_LAUNCHXL_PIN_LED_OFF           0
#define CC1310_LAUNCHXL_PIN_RLED              PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PIN_GLED              PIN_UNASSIGNED

/* PWM Outputs */
#define CC1310_LAUNCHXL_PWMPIN0               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN1               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN2               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN3               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN4               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN5               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN6               PIN_UNASSIGNED
#define CC1310_LAUNCHXL_PWMPIN7               PIN_UNASSIGNED

/* SPI */
#define CC1310_LAUNCHXL_SPI_FLASH_CS          IOID_20
#define CC1310_LAUNCHXL_FLASH_CS_ON           0
#define CC1310_LAUNCHXL_FLASH_CS_OFF          1

/* SPI Board */
#define CC1310_LAUNCHXL_SPI0_MISO             IOID_8          /* RF1.20 */
#define CC1310_LAUNCHXL_SPI0_MOSI             IOID_9          /* RF1.18 */
#define CC1310_LAUNCHXL_SPI0_CLK              IOID_10         /* RF1.16 */
#define CC1310_LAUNCHXL_SPI0_CSN              IOID_11
#define CC1310_LAUNCHXL_SPI1_MISO             PIN_UNASSIGNED
#define CC1310_LAUNCHXL_SPI1_MOSI             PIN_UNASSIGNED
#define CC1310_LAUNCHXL_SPI1_CLK              PIN_UNASSIGNED
#define CC1310_LAUNCHXL_SPI1_CSN              PIN_UNASSIGNED

/* UART Board */
#define CC1310_LAUNCHXL_UART_RX               PIN_UNASSIGNED          /* RXD */
#define CC1310_LAUNCHXL_UART_TX               PIN_UNASSIGNED          /* TXD */
#define CC1310_LAUNCHXL_UART_CTS              PIN_UNASSIGNED         /* CTS */
#define CC1310_LAUNCHXL_UART_RTS              PIN_UNASSIGNED         /* RTS */

/*!
 *  @brief  Initialize the general board specific settings
 *
 *  This function initializes the general board specific settings.
 */
void CC1310_LAUNCHXL_initGeneral(void);

/*!
 *  @brief  Turn off the external flash on LaunchPads
 *
 */
void CC1310_LAUNCHXL_shutDownExtFlash(void);

/*!
 *  @brief  Wake up the external flash present on the board files
 *
 *  This function toggles the chip select for the amount of time needed
 *  to wake the chip up.
 */
void CC1310_LAUNCHXL_wakeUpExtFlash(void);

/*!
 *  @def    CC1310_LAUNCHXL_ADCBufName
 *  @brief  Enum of ADCBufs
 */
typedef enum CC1310_LAUNCHXL_ADCBufName {
    CC1310_LAUNCHXL_ADCBUF0 = 0,

    CC1310_LAUNCHXL_ADCBUFCOUNT
} CC1310_LAUNCHXL_ADCBufName;

/*!
 *  @def    CC1310_LAUNCHXL_ADCBuf0SourceName
 *  @brief  Enum of ADCBuf channels
 */
typedef enum CC1310_LAUNCHXL_ADCBuf0ChannelName {
    CC1310_LAUNCHXL_ADCBUF0CHANNEL0 = 0,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL1,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL2,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL3,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL4,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL5,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL6,
    CC1310_LAUNCHXL_ADCBUF0CHANNEL7,
    CC1310_LAUNCHXL_ADCBUF0CHANNELVDDS,
    CC1310_LAUNCHXL_ADCBUF0CHANNELDCOUPL,
    CC1310_LAUNCHXL_ADCBUF0CHANNELVSS,

    CC1310_LAUNCHXL_ADCBUF0CHANNELCOUNT
} CC1310_LAUNCHXL_ADCBuf0ChannelName;

/*!
 *  @def    CC1310_LAUNCHXL_ADCName
 *  @brief  Enum of ADCs
 */
typedef enum CC1310_LAUNCHXL_ADCName {
    CC1310_LAUNCHXL_ADC0 = 0,
    CC1310_LAUNCHXL_ADC1,
    CC1310_LAUNCHXL_ADC2,
    CC1310_LAUNCHXL_ADC3,
    CC1310_LAUNCHXL_ADC4,
    CC1310_LAUNCHXL_ADC5,
    CC1310_LAUNCHXL_ADC6,
    CC1310_LAUNCHXL_ADC7,
    CC1310_LAUNCHXL_ADCDCOUPL,
    CC1310_LAUNCHXL_ADCVSS,
    CC1310_LAUNCHXL_ADCVDDS,

    CC1310_LAUNCHXL_ADCCOUNT
} CC1310_LAUNCHXL_ADCName;

/*!
 *  @def    CC1310_LAUNCHXL_CryptoName
 *  @brief  Enum of Crypto names
 */
typedef enum CC1310_LAUNCHXL_CryptoName {
    CC1310_LAUNCHXL_CRYPTO0 = 0,

    CC1310_LAUNCHXL_CRYPTOCOUNT
} CC1310_LAUNCHXL_CryptoName;

/*!
 *  @def    CC1310_LAUNCHXL_AESCCMName
 *  @brief  Enum of AESCCM names
 */
typedef enum CC1310_LAUNCHXL_AESCCMName {
    CC1310_LAUNCHXL_AESCCM0 = 0,

    CC1310_LAUNCHXL_AESCCMCOUNT
} CC1310_LAUNCHXL_AESCCMName;

/*!
 *  @def    CC1310_LAUNCHXL_AESGCMName
 *  @brief  Enum of AESGCM names
 */
typedef enum CC1310_LAUNCHXL_AESGCMName {
    CC1310_LAUNCHXL_AESGCM0 = 0,

    CC1310_LAUNCHXL_AESGCMCOUNT
} CC1310_LAUNCHXL_AESGCMName;

/*!
 *  @def    CC1310_LAUNCHXL_AESCBCName
 *  @brief  Enum of AESCBC names
 */
typedef enum CC1310_LAUNCHXL_AESCBCName {
    CC1310_LAUNCHXL_AESCBC0 = 0,

    CC1310_LAUNCHXL_AESCBCCOUNT
} CC1310_LAUNCHXL_AESCBCName;

/*!
 *  @def    CC1310_LAUNCHXL_AESCTRName
 *  @brief  Enum of AESCTR names
 */
typedef enum CC1310_LAUNCHXL_AESCTRName {
    CC1310_LAUNCHXL_AESCTR0 = 0,

    CC1310_LAUNCHXL_AESCTRCOUNT
} CC1310_LAUNCHXL_AESCTRName;

/*!
 *  @def    CC1310_LAUNCHXL_AESECBName
 *  @brief  Enum of AESECB names
 */
typedef enum CC1310_LAUNCHXL_AESECBName {
    CC1310_LAUNCHXL_AESECB0 = 0,

    CC1310_LAUNCHXL_AESECBCOUNT
} CC1310_LAUNCHXL_AESECBName;

/*!
 *  @def    CC1310_LAUNCHXL_AESCTRDRBGName
 *  @brief  Enum of AESCTRDRBG names
 */
typedef enum CC1310_LAUNCHXL_AESCTRDRBGName {
    CC1310_LAUNCHXL_AESCTRDRBG0 = 0,

    CC1310_LAUNCHXL_AESCTRDRBGCOUNT
} CC1310_LAUNCHXL_AESCTRDRBGName;

/*!
 *  @def    CC1310_LAUNCHXL_TRNGName
 *  @brief  Enum of TRNG names
 */
typedef enum CC1310_LAUNCHXL_TRNGName {
    CC1310_LAUNCHXL_TRNG0 = 0,

    CC1310_LAUNCHXL_TRNGCOUNT
} CC1310_LAUNCHXL_TRNGName;

/*!
 *  @def    CC1310_LAUNCHXL_GPIOName
 *  @brief  Enum of GPIO names
 */
typedef enum CC1310_LAUNCHXL_GPIOName {
    CC1310_LAUNCHXL_GPIO_S1 = 0,
    CC1310_LAUNCHXL_GPIO_S2,
    CC1310_LAUNCHXL_SPI_MASTER_READY,
    CC1310_LAUNCHXL_SPI_SLAVE_READY,
    CC1310_LAUNCHXL_GPIO_LED_GREEN,
    CC1310_LAUNCHXL_GPIO_LED_RED,
    CC1310_LAUNCHXL_GPIO_TMP116_EN,
    CC1310_LAUNCHXL_GPIO_SPI_FLASH_CS,
    CC1310_LAUNCHXL_SDSPI_CS,
    CC1310_LAUNCHXL_GPIO_LCD_CS,
    CC1310_LAUNCHXL_GPIO_LCD_POWER,
    CC1310_LAUNCHXL_GPIO_LCD_ENABLE,
    CC1310_LAUNCHXL_GPIOCOUNT
} CC1310_LAUNCHXL_GPIOName;

/*!
 *  @def    CC1310_LAUNCHXL_GPTimerName
 *  @brief  Enum of GPTimer parts
 */
typedef enum CC1310_LAUNCHXL_GPTimerName {
    CC1310_LAUNCHXL_GPTIMER0A = 0,
    CC1310_LAUNCHXL_GPTIMER0B,
    CC1310_LAUNCHXL_GPTIMER1A,
    CC1310_LAUNCHXL_GPTIMER1B,
    CC1310_LAUNCHXL_GPTIMER2A,
    CC1310_LAUNCHXL_GPTIMER2B,
    CC1310_LAUNCHXL_GPTIMER3A,
    CC1310_LAUNCHXL_GPTIMER3B,

    CC1310_LAUNCHXL_GPTIMERPARTSCOUNT
} CC1310_LAUNCHXL_GPTimerName;

/*!
 *  @def    CC1310_LAUNCHXL_GPTimers
 *  @brief  Enum of GPTimers
 */
typedef enum CC1310_LAUNCHXL_GPTimers {
    CC1310_LAUNCHXL_GPTIMER0 = 0,
    CC1310_LAUNCHXL_GPTIMER1,
    CC1310_LAUNCHXL_GPTIMER2,
    CC1310_LAUNCHXL_GPTIMER3,

    CC1310_LAUNCHXL_GPTIMERCOUNT
} CC1310_LAUNCHXL_GPTimers;

/*!
 *  @def    CC1310_LAUNCHXL_I2CName
 *  @brief  Enum of I2C names
 */
typedef enum CC1310_LAUNCHXL_I2CName {
    CC1310_LAUNCHXL_I2C0 = 0,

    CC1310_LAUNCHXL_I2CCOUNT
} CC1310_LAUNCHXL_I2CName;

/*!
 *  @def    CC1310_LAUNCHXL_I2SName
 *  @brief  Enum of I2S names
 */
typedef enum CC1310_LAUNCHXL_I2SName {
    CC1310_LAUNCHXL_I2S0 = 0,

    CC1310_LAUNCHXL_I2SCOUNT
} CC1310_LAUNCHXL_I2SName;

/*!
 *  @def    CC1310_LAUNCHXL_NVSName
 *  @brief  Enum of NVS names
 */
typedef enum CC1310_LAUNCHXL_NVSName {
#ifndef Board_EXCLUDE_NVS_INTERNAL_FLASH
    CC1310_LAUNCHXL_NVSCC26XX0 = 0,
#endif
#ifndef Board_EXCLUDE_NVS_EXTERNAL_FLASH
    CC1310_LAUNCHXL_NVSSPI25X0,
#endif

    CC1310_LAUNCHXL_NVSCOUNT
} CC1310_LAUNCHXL_NVSName;

/*!
 *  @def    CC1310_LAUNCHXL_PWM
 *  @brief  Enum of PWM outputs
 */
typedef enum CC1310_LAUNCHXL_PWMName {
    CC1310_LAUNCHXL_PWM0 = 0,
    CC1310_LAUNCHXL_PWM1,
    CC1310_LAUNCHXL_PWM2,
    CC1310_LAUNCHXL_PWM3,
    CC1310_LAUNCHXL_PWM4,
    CC1310_LAUNCHXL_PWM5,
    CC1310_LAUNCHXL_PWM6,
    CC1310_LAUNCHXL_PWM7,

    CC1310_LAUNCHXL_PWMCOUNT
} CC1310_LAUNCHXL_PWMName;

/*!
 *  @def    CC1310_LAUNCHXL_SDName
 *  @brief  Enum of SD names
 */
typedef enum CC1310_LAUNCHXL_SDName {
    CC1310_LAUNCHXL_SDSPI0 = 0,

    CC1310_LAUNCHXL_SDCOUNT
} CC1310_LAUNCHXL_SDName;

/*!
 *  @def    CC1310_LAUNCHXL_SPIName
 *  @brief  Enum of SPI names
 */
typedef enum CC1310_LAUNCHXL_SPIName {
    CC1310_LAUNCHXL_SPI0 = 0,
    CC1310_LAUNCHXL_SPI1,

    CC1310_LAUNCHXL_SPICOUNT
} CC1310_LAUNCHXL_SPIName;

/*!
 *  @def    CC1310_LAUNCHXL_UARTName
 *  @brief  Enum of UARTs
 */
typedef enum CC1310_LAUNCHXL_UARTName {
    CC1310_LAUNCHXL_UART0 = 0,

    CC1310_LAUNCHXL_UARTCOUNT
} CC1310_LAUNCHXL_UARTName;

/*!
 *  @def    CC1310_LAUNCHXL_UDMAName
 *  @brief  Enum of DMA buffers
 */
typedef enum CC1310_LAUNCHXL_UDMAName {
    CC1310_LAUNCHXL_UDMA0 = 0,

    CC1310_LAUNCHXL_UDMACOUNT
} CC1310_LAUNCHXL_UDMAName;

/*!
 *  @def    CC1310_LAUNCHXL_WatchdogName
 *  @brief  Enum of Watchdogs
 */
typedef enum CC1310_LAUNCHXL_WatchdogName {
    CC1310_LAUNCHXL_WATCHDOG0 = 0,

    CC1310_LAUNCHXL_WATCHDOGCOUNT
} CC1310_LAUNCHXL_WatchdogName;


#ifdef __cplusplus
}
#endif

#endif /* __CC1310_LAUNCHXL_BOARD_H__ */

电路板图像

您能告诉我如何将 功耗降低 到数据表中显示的水平吗

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

    您是否已确保 CC1190处于断电状态?

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

    我正在使用  pinStandby 示例,您能告诉我如何关闭 cc1190吗?

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

    请阅读 CC1190数据表、了解如何定义引脚。  https://www.ti.com/lit/pdf/swra517 介绍了您必须更改的引脚。  

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

    它表明、我们必须将 DIO28-DIO29-DIO30设置为输出、然后将其设为低电平

    modıfıed 我要使用的代码  

    /*
     * Copyright (c) 2016-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.
     */
    
    /*
     *  ======== pinStandby.c ========
     */
    #include <unistd.h>
    
    /* Driver Header files */
    #include <ti/drivers/PIN.h>
    
    /* Example/Board Header files */
    #include "Board.h"
    
    /* Led pin table */
    PIN_Config LedPinTable[] =
    {
     IOID_28 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* IOID_28 initially off */
     IOID_29 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* IOID_29 initially off */
     IOID_30 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* IOID_30 initially off */
        PIN_TERMINATE                                                                      /* Terminate list */
    };
    
    /*
     *  ======== mainThread ========
     */
    void *mainThread(void *arg0)
    {
        PIN_State   pinState;
        PIN_Handle  hPin;
    //    uint32_t    currentOutputVal;
        uint32_t    standbyDuration = 5;
    
        uint32_t    IOID_28_value = 0;
        uint32_t    IOID_29_value = 0;
        uint32_t    IOID_30_value = 0;
    
        hPin = PIN_open(&pinState, LedPinTable);
    
        PIN_setOutputValue(hPin, IOID_28, 0);
        PIN_setOutputValue(hPin, IOID_29, 0);
        PIN_setOutputValue(hPin, IOID_30, 0);
    
        IOID_28_value = PIN_getOutputValue(IOID_28);
        IOID_29_value = PIN_getOutputValue(IOID_29);
        IOID_30_value = PIN_getOutputValue(IOID_30);
    
        while(1) {
            /* Sleep, to let the power policy transition the device to standby */
            sleep(standbyDuration);
    
            /* Read current output value for all pins */
            //currentOutputVal =  PIN_getPortOutputValue(hPin);
    
            /* Toggle the LEDs, configuring all LEDs at once */
            //PIN_setPortOutputValue(hPin, ~currentOutputVal);
        }
    }
    

    电流值为0.45mA (仍然很高)  

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

    我采用了 CC13-90 Launchpad

    并添加了 GPIO28-30、在空示例中添加了以下代码:

    GPIO_setConfig (CC1310_LAUNCHXL_GPIO_28、GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
    GPIO_setConfig (CC1310_LAUNCHXL_GPIO_29、GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
    GPIO_setConfig (CC1310_LAUNCHXL_GPIO_30、GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);

    并具有以下特性:

    正如您看到的、待机时的电流消耗小于1uA。  

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

    在再次尝试您在上面指出的内容后、我解决了问题、非常感谢您的 ter