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.

[参考译文] RTOS/CC1310:RTOS/CC1310

Guru**** 2393725 points
Other Parts Discussed in Thread: TMP116

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/697181/rtos-cc1310-rtos-cc1310

器件型号:CC1310
主题中讨论的其他器件:TMP116SimpliciTI

工具/软件:TI-RTOS

您好!


我有一个与 TMP116 (i2c)传感器连接的定制 PCB、为此创建了两个任务、一个用于读取温度、另一个用于射频通信、射频通信工作正常、我甚至可以读取温度。
我分步离开、当我添加部件 i2c tmp 116时、微控制器消耗电流129 uA、在这种情况下如何操作?
知道我的目标是达到4uA 的电流。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!
    为了澄清这种情况、这里是有关温度器件的任务、如果您有时间查看此代码、请吗?

    ------------------------------------------------------
    空 sendorTask (UArg0、UArgarg1)

    static opto_sonde_data_t optosonde_data;
    float 温度;
    I2C_Handle I2C;
    TMP116_handle tmp116Handle;
    I2C_Params i2cParams;
    uint32_t 超时= 0;

    I2C_Params_init (&i2cParams);
    i2cParams.transferMode = I2C_MODE_BLOCKING;
    i2cParams.bitrate = I2C_400kHz;
    I2C = I2C_open (Board_I2C_TMP、&i2cParams);
    if (i2c == NULL){


    否则{


    TMP116_init();
    Task_sleep (500 * 100);
    tmp116Handle = TMP116_open (Board_I2C_TMP、i2c、NULL);

    if (tmp116Handle == NULL){
    }否则


    睡眠(2);

    while (!TMP116_configConversions (tmp116Handle、TMP116_OS_MODE、TMP116_0CONV、TMP116_0SAMPLES)& timeout!= 5000){

    usleep(200);// attente 200us,alors un time out de 1s
    超时++;

    if (TMP116_getTemp (tmp116Handle、TMP116_Celsius、&temperature)){

    否则{

    超时=0;
    while (!TMP116_close (tmp116Handle)&& timeout!= 10000){
    usleep(200);
    超时++;

    I2C_Close (i2c);

    uint16_t MSB =(uint8_t)(温度);
    uint8_t LSB =(uint8_t)((温度- MSB)* 100);


    optosonde_data.temp_deg_FRAC_8 =(MSB<8)+LSB;

    while (!AONBatMonNewBatteryMeasureReady())

    //等待
    Task_sleep (1000 * 1000 / Clock_tickPeriod);

    optosonde_data.bat_20mV =(AONBatMonBatteryVoltageGet ()* 390625)/ 2000000;
    AONBatMonDisable();

    // Init Tx 任务
    Task_Params_init (&txTaskParams);
    TxTaskParams.STACKSIZE = RFEASYS LINKTX_TASK_STACK_SIZE;
    txTaskParams.priority = RFEASINKTX_TASK_priority + 1;
    txTaskParams.stack =&txTaskStack;
    txTaskParams.arg0 =(XDC_UArg) optosonde_data (&O);

    Task_construction (&txTask、rfEasyLinkTxFnx、&txTaskParams、NULL);

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

    您已有一个有关此主题的活动帖子、请不要创建重复帖子、但请坚持现有帖子:

    https://e2e.ti.com/support/sensor/temperature_sensors/f/243/t/693844

    https://e2e.ti.com/support/sensor/temperature_sensors/f/243/t/696887

    e2e.ti.com/.../696001