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:检索从器件加载的程序

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1125616/cc1310-retrieve-program-loaded-from-device

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

您好!

我正在使用多个基于 CC1310 (CC1310F32RSMT 微型)的定制板、其中一些工作正常、但其他一些不工作 我想检索加载到程序中的代码、以检查加载错误是否存在。 有什么方法可以实现它吗?

我的项目包括每12小时通过射频向网关发送数据包、在这段时间进入睡眠状态之间。 发送器节点中出现问题、因为其中一些发送器节点发送数据包、但不会进入睡眠状态。

这可能是由于硬件错误、但海关板的制造方式是相同的。 这就是为什么我要检查加载的代码、以防出现芯片问题。 接受其他建议、以检查它们为什么不起作用。

提前感谢、

Alberto

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

    您好、Alberto、  

    假设允许进行调试、您可以使用 UniFlash 验证目标上的映像。 UniFlash (或 CCS)中的存储器浏览器也可用于读取整个闪存范围并将其导出到文件中。

    如果允许调试、则只能执行上述操作;如果允许调试、我建议只使用 CCS 启动无工程调试会话、并使用反汇编器和调试程序。

    如果不允许进行调试、则恐怕无法检索程序。  

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    感谢您的回复。 我使用了 uniflash 并导出存储器。 我比较了这两个和、它们完全相同。

    您是否了解其他建议?

    此致、
    Alberto

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

    您好、Alberto、  

    您如何确定节点未进入睡眠状态? 对于有此问题的节点、是在发送数据包后它们不会进入睡眠状态还是永远不会进入睡眠状态?

    [引用 userid="519432" URL"~/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1GHz-forum/1125616/cc1310-retrier-program-loading-fy-devices"]发送器节点中出现问题,因为其中一些发送器发送数据包但无法进入休眠状态。

    谢谢、
    尼古拉伊

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

    Nikolaj、您好!

    我正在使用万用表测量电流消耗、当它们进入睡眠状态时、消耗的电流约为18uA。 具有此问题的电流消耗为1.3mA。 发送数据包后、他们永远不会进入睡眠状态。

    如果这有帮助、这是我的代码。 SLEE()位于441行。

    /*
     * Copyright (c) 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.
     */
    
    /***** Includes *****/
    /* Standard C Libraries */
    #include <stdlib.h>
    #include <unistd.h>
    
    /* TI Drivers */
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/pin/PINCC26XX.h>
    #include <math.h>
    #include <smartrf_settings/smartrf_settings.h>
    #include <time.h>
    #include <ti/sysbios/hal/Seconds.h>
    #include <ti/drivers/ADCBuf.h>
    #include <ti/drivers/ADC.h>
    //#include <ti/devices/cc13x0/driverlib/aon_ioc.h>
    //#include <ti/sysbios/family/arm/cc26xx/Timer.h>
    #include <ti/dpl/PowerCC26XX_tirtos.c>
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26XX.h>
    #include <ti/devices/cc13x0/driverlib/aon_batmon.h>
    
    
    /* Driverlib Header files */
    #include DeviceFamily_constructPath(driverlib/rf_prop_mailbox.h)
    
    /* Board Header files */
    #include "Board.h"
    #include <ti/drivers/GPIO.h>
    
    /***** Defines *****/
    #define ADCBUFFERSIZE    (28)
    
    #define ADC_SAMPLE_COUNT  (10)
    
    #define THREADSTACKSIZE   (768)
    
    #define ID0 0
    #define ID1 1
    
    /* Do power measurement */
    //#define POWER_MEASUREMENT
    
    /* Packet TX Configuration */
    #define PAYLOAD_LENGTH      204
    #define NORM_VALUES         10
    #ifdef POWER_MEASUREMENT
    #define PACKET_INTERVAL     5  /* For power measurement set packet interval to 5s */
    #else
    #define PACKET_INTERVAL     300  /* Set packet interval to 500000us or 500ms */
    #endif
    
    /***** Prototypes *****/
    
    /***** Variable declarations *****/
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    //Timer_Object *TimerObj;
    //Timer_Handle TimerHandle;
    
    /* Pin driver handle */
    //static PIN_Handle ledPinHandle;
    //static PIN_State ledPinState;
    
    static char packet[PAYLOAD_LENGTH];
    //static uint16_t seqNumber;
    
    /* ADC conversion result variables */
    uint16_t adcValue0;
    uint32_t adcValue0MicroVolt;
    uint16_t adcValue1[ADC_SAMPLE_COUNT];
    uint32_t adcValue1MicroVolt[ADC_SAMPLE_COUNT];
    
    uint16_t sampleBufferOne[ADCBUFFERSIZE];
    uint16_t sampleBufferTwo[ADCBUFFERSIZE];
    float microVoltBuffer[ADCBUFFERSIZE];
    float valor_temperatura=0;
    float media[ADCBUFFERSIZE];
    int_fast16_t val;
    float Temperature;
    float v_temperature[24];
    bool first_time = true;
    bool send_payload = false;
    
    /*
     * Application LED pin configuration table:
     *   - All LEDs board LEDs are off.
     */
    PIN_Config pinTable[] =
    {
        Board_PIN_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    #ifdef POWER_MEASUREMENT
    #if defined(Board_CC1350_LAUNCHXL)
        Board_DIO30_SWPWR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    #endif
    #endif
        PIN_TERMINATE
    };
    
    /***** Function definitions *****/
    float conversionTemp(uint16_t value){
        float NTC;
        float Temp;
    
    //    NTC = ((2.27*100000)/value)-100000;
    //    NTC = NTC/1000;
        NTC = 100000*4096/value - 100000;
        NTC = NTC/1000;
    
        Temp = 66.266*exp((-0.01*NTC));
    //    Temp = exp((NTC-421.37)/-96.7);
    
        return(Temp);
    }
    
    void conversionFloat(float temp, float battery, char * packet, unsigned int index)
    {
        float aux=roundf(temp * 100); // Get 2 decimals precision ( Format: 23.48 ºC for example )
        int n=(int)aux; // Convert to int
    
        uint8_t i;
    
        /*if(index == 0){
            for(i=5;i>1;i--) // Sending temperature data. First 2 bytes are not written, current configuration information
            {
                packet[i]=n%10; // In the first iteration, this corresponds to the first digit
                n=n/10;
            }
    
            aux=roundf(battery * 100); // Format: 2.35 V for example
            n=(int)aux;
    
            for(i=8;i>5;i--) // Sending battery voltage data
                {
                    packet[i]=n%10;
                    n=n/10;
                }
        }else{*/
        for(i=(5+index*9-index);i>(1+index*9-index);i--) // Temperature
        {
            packet[i]=n%10 + '0';
            n=n/10;
        }
    
        aux=roundf(battery * 100);
        n=(int)aux;
    
        for(i=(9+index*9-index);i>(5+index*9-index);i--) // Battery voltage
        {
            if((i+index) %9 == 0){
                packet[i] = '!'; // Data separator
            }else{
                packet[i]=n%10 + '0';
                n=n/10;
            }
        }
    }
    
    uint16_t readADC(){
    
        ADC_Handle   adc;
        ADC_Params   params;
        int_fast16_t res;
        //float floatValue;
        uint16_t normValue = 0;
        uint8_t i;
    
        ADC_init();
        ADC_Params_init(&params);
        adc = ADC_open(2, &params);
    
        if (adc != NULL) {
    
            for (i=0; i < NORM_VALUES; i++){
                /* Blocking mode conversion */
                res = ADC_convert(adc, &adcValue0);
    
                if (res == ADC_STATUS_SUCCESS) {
    
                    adcValue0MicroVolt = ADC_convertRawToMicroVolts(adc, adcValue0);
    //                floatValue = adcValue0MicroVolt*1.00/1000000.00;
                    normValue += adcValue0;
                    adcValue0 = 0;
    
                }else{
                    i--;
                }
            }
    
            normValue = normValue/NORM_VALUES;
    
            ADC_close(adc);
        }
    
        return (normValue);
    }
    
    float getBatteryValue(){
    //    uint32_t battery, BATstatus;
    //    float BATvoltage;
    //
    //    battery = AONBatMonBatteryVoltageGet();
    //
    //    // convert in Milli volts
    //    BATstatus = (BATstatus * 125) >> 5;
    //
    //    //convert in floating point value
    //    BATvoltage = (float)BATstatus / 1000;
    
        float MeasuredVoltage = (float)(((uint32_t)HWREG(AON_BATMON_BASE + AON_BATMON_O_BAT)*125) >> 5)/1000; // Convert to milivolts, then convert to float
    
        return (MeasuredVoltage);
    }
    
    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        struct tm* next_time;
        struct tm current_time;
        //time_t next_seconds;
        time_t current_seconds;
        //uint32_t sleep_interval;
    
    //    float batteryValue;
    
    //    memset(&next_time, 0, sizeof(struct tm)); // YO he comentado esta línea
        memset(&current_time, 0, sizeof(struct tm)); // Esta línea estaba comentada
    
    //    float microVoltValue;
        uint16_t ADCvalue;
        //float Temperature;
        //float v_temperature[12]; // Vector of temperatures measured to be sent
        float v_MeasuredVoltage[24];
        float MeasuredVoltage;
        float aux_temp = 0;
        float aux_voltage = 0;
        unsigned int cont = 0;
    
        RF_cmdPropTx.pktLen = PAYLOAD_LENGTH;
        RF_cmdPropTx.pPkt = packet;
        RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
    
        // Set guardian ID
        unsigned int id = 5;
    
        // Payload id
        unsigned int payload_id = 0;
    
        // Set the struct date / time to 2016 / 5 / 21 18:00:00
        current_time.tm_year = 2022 - 1970;
        current_time.tm_mon = 8 - 1;
        current_time.tm_mday = 11;
        current_time.tm_hour = 16;
        current_time.tm_min = 49;
        current_time.tm_sec = 0;
    
        // Set the struct date / time to 2016 / 5 / 21 18:00:00
        //next_time.tm_year = 2016 - 1970;
        //next_time.tm_mon = 5 - 1;
        //next_time.tm_mday = 21;
        //next_time.tm_hour = 18;
        //next_time.tm_min = 0;
        //next_time.tm_sec = 0;
    
        AONBatMonEnable(); // Enable the measurements of the temperature and the battery voltage
    
        /* Create packet with incrementing sequence number and random payload */
        packet[0] = (uint8_t)ID0;
        packet[1] = (uint8_t)ID1;
    
        // Estas líneas de abajo estaban comentadas
        current_seconds = mktime(&current_time); // Convert to number of seconds, this will also fill up tm_wday and tm_yday
        Seconds_set(current_seconds); // Set the date into the system (Update the real time clock with number of seconds since 1970)
    //
    //    next_seconds = mktime(&next_time);
    //
    //    sleep_interval = next_seconds-current_seconds;
        RF_EventMask terminationReason;
    
        while(1) // Executed each 1 hour
        {
            // Get Battery level
    //        float batteryValue = getBatteryValue();
            //float MeasuredVoltage = (float)(((uint32_t)HWREG(AON_BATMON_BASE + AON_BATMON_O_BAT)*125) >> 5)/1000; // Battery level. Convert to milivolts, then convert to float
    
            uint8_t i = 0;
            for(i=0; i<5; i++){ // Mean of 5 measurements
                ADCvalue = readADC();
                aux_temp += conversionTemp(ADCvalue); // ADC value conversion to temperature
                aux_voltage += (float)(((uint32_t)HWREG(AON_BATMON_BASE + AON_BATMON_O_BAT)*125) >> 5)/1000; // Battery level. Convert to milivolts, then convert to float
            }
            Temperature = aux_temp/5;
            MeasuredVoltage = aux_voltage/5;
            aux_temp = 0;
            aux_voltage = 0;
    
            //ADCvalue = readADC();
            //Temperature = conversionTemp(ADCvalue); // ADC value conversion to temperature
            //conversionFloat(Temperature, MeasuredVoltage, packet); // Get packet with temperature and battery data
    
            if(cont<12){
                v_temperature[cont] = Temperature;
                v_MeasuredVoltage[cont] = MeasuredVoltage;
                cont++;
            }
            else{
                cont = 0;
                send_payload = true;
            }
    
            if(send_payload){// Down half with current measurements and upper half with 12h previous ones
                send_payload = false;
                uint8_t j=0;
                for(j=0; j<12; j++){
                    v_temperature[j+12] = v_temperature[j];
                    v_MeasuredVoltage[j+12] = v_MeasuredVoltage[j];
                }
            }
    
    //        uint8_t i;
    //        for (i = 2; i < PAYLOAD_LENGTH; i++)
    //        {
    //            packet[i] = 9;
    //        }
    
            UInt32 seconds = Seconds_get(); // Get current seconds
            next_time = localtime(&seconds); // Convert current time to struct
    
            if(next_time->tm_hour == 4 || next_time->tm_hour == 16){ // Send packet each 12h
            //if(next_time->tm_min >= 0 || next_time->tm_min == 1 || next_time->tm_min == 2 || next_time->tm_min == 3 || next_time->tm_min == 4 || next_time->tm_min == 5){
                if(first_time){
                    //sleep(id); // Offset random time
                    first_time = false;
                }
                for(i=0; i<24; i++){
                    conversionFloat(v_temperature[i], v_MeasuredVoltage[i], packet, i); // Create packet with temperature and battery voltage
                }
    
                // Copy guardian identifier into packet
                packet[194] = 'I';
                unsigned int n;
                if(id<10){
                    packet[195] = id +'0';
                }else if(id>=10 && id<100){
                    n = id;
                    packet[196]=n%10 + '0';
                    n=n/10;
                    packet[195]=n%10 + '0';
                }else if(id>=100){
                    n = id;
                    packet[197]=n%10 + '0';
                    n=n/10;
                    packet[196]=n%10 + '0';
                    n=n/10;
                    packet[195]=n%10 + '0';
                }
    
                // Copy payload identifier into packet
                packet[198] = 'T';
                if(payload_id<10){
                    packet[199] = payload_id +'0';
                }else if(payload_id>=10 && payload_id<100){
                    n = payload_id;
                    packet[200]=n%10 + '0';
                    n=n/10;
                    packet[199]=n%10 + '0';
                }else if(payload_id>=100 && payload_id<1000){
                    n = payload_id;
                    packet[201]=n%10 + '0';
                    n=n/10;
                    packet[200]=n%10 + '0';
                    n=n/10;
                    packet[199]=n%10 + '0';
                }else if(payload_id>=1000 && payload_id<10000){
                    n = payload_id;
                    packet[202]=n%10 + '0';
                    n=n/10;
                    packet[201]=n%10 + '0';
                    n=n/10;
                    packet[200]=n%10 + '0';
                    n=n/10;
                    packet[199]=n%10 + '0';
                }else if(payload_id>=10000 && payload_id<100000){
                    n = payload_id;
                    packet[203]=n%10 + '0';
                    n=n/10;
                    packet[202]=n%10 + '0';
                    n=n/10;
                    packet[201]=n%10 + '0';
                    n=n/10;
                    packet[200]=n%10 + '0';
                    n=n/10;
                    packet[199]=n%10 + '0';
                }
    
                terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0); // Send packet
                payload_id++;
            }
            RF_yield(rfHandle); // Radio powered off
            sleep(3600); // 1 hour sleep
        }
    }
    
     

    此致、

    Alberto

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

    您好、Alberto、
    您是否能够调试您的应用并单步执行睡眠功能。 调用 SLEEP 将导致调用 PowerCC26XX_standbyPolicy。 如果它进入待机状态、则应调用 Power_sleep、如果它未进入待机  状态、则会调用 PRCMDeepSleep 或 PRCMSleep。  

    如果它没有调用 Power_sleep、您能否告知我阻止它调用  Power_sleep 的条件

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    很抱歉我的答复很晚,我不在办公室。 我无法在我的定制板上调试我的应用。 相反、我在 CC1310 launchpad 上对其进行了调试、但它不会进入您提到的 Power_sleep()函数、而是进入'sleep.c'文件中的 sleep()函数。

    unsigned sleep(unsigned seconds)
    {
        unsigned long secs, ticks;  /* at least 32-bit */
        unsigned max_secs, rval;    /* native size, might be 16-bit */
    
        max_secs = MAX_SECONDS;
    
        if (seconds < max_secs) {
            secs = seconds;
            rval = 0;
        }
        else {
            secs = max_secs;
            rval = seconds - max_secs;
        }
    
        /* must use 64-bit math to compute tick value */
        ticks = ((uint64_t)secs * 1000000L) / (uint64_t)Clock_tickPeriod;
    
        /* must add one tick to ensure a full duration of requested ticks */
        Task_sleep((UInt32)(ticks + 1));
    
        return (rval);
    }

    此致、

    Alberto

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

    您好、Alberto、

    很抱歉、回答错误。 我将尝试改进它。
    呼叫 睡眠(3600);将阻止呼叫任务1小时。 如果所有其他任务(空闲任务除外)也被阻止、则空闲任务将执行。 在大多数示例的默认配置下,IDLE 函数将调用 Power_idleFunc(),该函 数将调用 PowerCC26XX_standbyPolicy()。 如果 满足必要条件,则将调用此函数中的 Power_sleep()。

    您可以检查以下两项:

    1. 验证空闲任务是否实际正在运行(验证是否所有任务都被阻止)
    2. 如果空闲任务正在运行,请验证它是否调用  Power_idleFunc (),并检查是否调用了 Power_sleep()。

    但是、如果您无法在电路板上进行调试、则实际上无法进入待机状态、那么调试可能会很困难。

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    如何检查任务是否被阻止? 我无法调试电路板、但我尝试在 LaunchPad 上进行调试、以防万一。 在 launchpad 上进行调试时、我只能看到程序在 我附加的代码段中的 Task_sleep ((uint32)(tick + 1))停止1小时。

    当电路板发送数据时、我检查 了接收到的数据、发现其中一个数据未更新。 每次发送数据包时、此数据都会增加、但我看到数据不会增加。 我想、每次运行一个周期时、电路板都会复位、这就是为什么不更新该数据的原因。  

    此致、
    Alberto

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

    您好、Alberto、

    您可以使用运行时对象视图(ROV)查看哪个任务是活动任务: https://software-dl.ti.com/ccs/esd/documents/rov_guide/html/src/rov.html

    顺便说一下、为什么不能在定制板上调试应用? 如果您能够使用 UniFlash 导出存储器、那么我希望您也能够调试应用。

    下面是一个有趣的观察! 当您认为电路板可能会在每个周期复位时、您所指的确切内容是什么? 每次调用睡眠还是每次发送数据包? 从"有故障"的设备发送数据包的频率如何? 是否仍然每12小时执行一次?

    [~引脚 userid="519432" url="/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1GHz-forum/1125616/cc1310-retrier-program-loaded-fy-devices/4184784#4184784"]当电路板发送数据时、我检查 了收到的数据、但未看到其中一个电路板的数据已更新。 每次发送数据包时、此数据都会增加、但我看到数据不会增加。 我想、每次运行一个周期时、电路板都会复位、这就是为什么不更新该数据的原因。  [/报价]

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    当我尝试调试自定义电路板时、我会遇到以下错误:

    [~引脚 userid="515500" URL"/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1GHz-forum/1125616/cc1310-retrier-program-loaded-fy-device/4187714#4187714"]下面是一个有趣的观察结果! 当您认为电路板可能会在每个周期复位时、您所指的确切内容是什么? 每次调用睡眠还是每次发送数据包? 从"有故障"的设备发送数据包的频率如何? 它是否仍然每12小时执行一次?[/引述]

    我仔细检查了这一点、数据包被设置为可重置。 更新成功、因此我们未找到错误...

    我使用 ROV 检查哪个任务处于活动状态、我看到发送数据的主线程被阻止。

    此致、
    Alberto

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

    您好、Alberto、

    您似乎为错误消息添加了错误的屏幕截图。

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    抱歉、这是错误消息。

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

    您好、再说一次、

    尽管我无法调试定制板、但我可以使用 ROV、我看到与 launchpad 相比、"任务"选项卡存在一些差异。

    这是对应于定制板的选项卡任务。

    此致、
    Alberto

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

    您好、Alberto、

    我认为、在尝试调试定制板时、您看到的问题在应用程序执行期间的某个时间发生。 了解时间是什么时候会很有用。

    您能否尝试执行以下操作并在遇到您报告的调试问题时告诉我:

    1. 按照以下说明启动无工程调试会话: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#manual-launch 
    2. 在连接到目标之前、发出电路板复位信号。 这应使目标在引导时停止。
    3. 连接到目标
    4. 加载 ROM 符号
    5. 验证目标在引导时是否已停止。 如果打开反汇编视图,您应该会看到目标已在 WaitHibProdNext 符号处停止
    6.  添加应用程序符号。 运行->加载->添加符号... ->浏览项目的.out 文件。
    7. 现在、您应该能够单步执行应用程序、并且您应该能够确定问题发生的时间。

    谢谢、
    尼古拉伊

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

    Nikolaj、您好!

    非常感谢您的详细帮助。 为了能够启动一个无项目调试会话、目标应该被连接、它是正确的吗? 此外、在步骤2中、电路板复位不可用。

    此致、
    Alberto

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

    启动无工程调试会话后、将不会连接目标(调试探针当然应该物理连接到器件)、并且在发出电路板复位信号之前不应该连接到目标。
    第1步。 您应该做的唯一事情是"右键单击所需的目标配置文件并选择 启动所选配置"。

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

    Nikolaj、您好!

    我 执行了前3个步骤:未连接目标(仅 Launchpad 的调试探针)、启动了选定的配置;板复位;连接定制板。 当我执行第4步时、我得到以下错误:

    Cortex_M3_0:GEL 输出:未加载符号(未连接到目标)。

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

    更新了:我在定制板上刷写了 pinStandby 项目、电流消耗甚至更低、消耗约为4mA。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="519432" url="~/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1GHz-forum/1125616/cc1310-retrier-program-loaded-fy-device/4189200#4189200"]连接定制板

    您是指将调试探针连接到定制板还是 在 CCS 中单击"Connect"按钮? (请参阅下面的)
    在我上面提到的所有步骤中、电路板应该被物理连接至调试探针。 在第4步中、您只需单击"Connect Target"、如下所示?

    此致、
    尼古拉伊

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

    Nikolaj、您好!

    谢谢、我误解了它、现在我只能通过反汇编视图调试应用。  调试时、它在执行3条指令后停止:

    另一方面、调试工作正常的定制板时、它会停在此处:

    比较这两者(我对反汇编不了解太多)、看起来很好的电路板跳过6020指令并识别"进入闪存"指令、而不是坏的指令 无论如何、我们的定制板没有闪存存储器。 我还在 launchpad 上尝试过它、但行为是相同的。

    我连接了电路板的原理图。

     e2e.ti.com/.../EsquemaGuardi_E100_n_5F00_2v0.pdf

    此致、
    Alberto

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

    您好、Alberto、

    "执行3 条指令后停止"是什么意思? 它如何停止?
    此外、当单步执行反汇编时、 您是否可以使用下面突出显示的"汇编步骤进入"。  

    谢谢、
    尼古拉伊

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

    Nikolaj、您好!  

    [引用 userid="515500" URL"~μ C/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1-GHz-forum/1125616/cc1310-retrier-program-loaded-fy-devices/4195408#4195408]"IT 含义是什么 ?"执行3条指令后停止"? 它如何停止?
    [/报价]

    它只是暂停、我无法继续执行反汇编。

    [~引脚 userid="515500" url="/support/wireless-connectivity/sub-1GHz-group/sub-1GHz/f/sub-1GHz-forum/1125616/cc1310-retrier-program-loaded-fy-device/4195408#4195408"]

    此外、当单步执行反汇编时、 您是否可以使用下面突出显示的"汇编步骤进入"。  

    [/报价]

    我正在使用"单步执行"进行调试、谢谢。 使用"汇编步骤"进行调试时、程序连续位于 for 循环内部、不会退出。

    循环位于"copy_decompress_lzss.c"文件中。 它位于 C:\ti\ccs1110\ccs\tools\compiler\ti-cgt-atm_20.2.6.sps\lib\src\

    /*****************************************************************************/
    /* copy_decompress_lzss.c                                                    */
    /*                                                                           */
    /* Copyright (c) 2006 Texas Instruments Incorporated                         */
    /* http://www.ti.com/                                                        */
    /*                                                                           */
    /*  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.     */
    /*                                                                           */
    /*                                                                           */
    /* Decompress routine for Lempel-Ziv-Storer-Szymanski (LZSS) compression.    */
    /* Given an input buffer with data compressed using LZSS encoding and an     */
    /* output buffer, this routine decompresses the data in the output buffer.   */
    /*                                                                           */
    /* NOTE:                                                                     */
    /* 1. This routine could be used to copy uninitialized or initialized global */
    /*    data space of a program. Hence this routine cannot define any global   */
    /*    variable.                                                              */
    /* 2. This routine will never be used to initialize stack space and hence    */
    /*    all the variables are allocated to stack.                              */
    /* 3. The calling application should ensure the output buffer is big         */
    /*    enough to hold the uncompressed data.                                  */
    /*                                                                           */
    /*****************************************************************************/
    #include <stdint.h>
    #include <limits.h>
    
    #define LZSS_EOD             4095
    #define LZSS_WINDOW_SIZE     4095
    
    /*****************************************************************************/
    /* The offset is always 12-bits so use a 16-bit type.                        */
    /*****************************************************************************/
    typedef uint_fast16_t offset_t;
    
    #if CHAR_BIT == 8
    
    /*****************************************************************************/
    /* The max length is 2^15-1+18, which can fit in a 16-bit type.              */
    /*****************************************************************************/
    typedef uint_fast16_t length_t;
    
    /*****************************************************************************/
    /* Flags is always of length 1 char.                                         */
    /*****************************************************************************/
    typedef uint_fast8_t  flags_t;
    
    #elif CHAR_BIT == 16
    
    /*****************************************************************************/
    /* The max length =s 2^16-1+17, which may not fit in a 16-bit type, so use a */
    /* 32-bit type.                                                              */
    /*****************************************************************************/
    typedef uint_fast32_t length_t;
    
    /*****************************************************************************/
    /* Flags is always of length 1 char.                                         */
    /*****************************************************************************/
    typedef uint_fast16_t flags_t;
    
    #else
    #error Illegal value for CHAR_BIT
    #endif
    
    /*****************************************************************************/
    /* MSP copy tables can handle moving functions even in small data model +    */
    /* large code model, where data pointers are not big enough to represent     */
    /* function pointers.  This requires the EABI decompression functions        */
    /* (SHARED/copy_*.c) to be changed to accept "far" pointers.  For this       */
    /* memory model combination, the decompression functions are changed to use  */
    /* "unsigned long" to represent function pointers, so function pointers      */
    /* through which we call these functions also needs to have a prototype      */
    /* accepting "unsigned long" instead of pointer types.  All other memory     */
    /* model combinations use the same prototype that all the other targets use: */
    /* two data pointer arguments.  Ultimately we use MSP peek/poke intrinsics   */
    /* to read/write the "far" memory.                                           */
    /*****************************************************************************/
    #if defined(__MSP430__) && defined(__LARGE_CODE_MODEL__) && !defined(__LARGE_DATA_MODEL__)
    typedef unsigned long pointer_t;
    typedef unsigned long pointer_to_const_t;
    #define READ_CHAR_ADV(x)     __data20_read_char(x++)
    #define WRITE_CHAR_ADV(x, c) __data20_write_char(x++, c)
    #else
    typedef       unsigned char *pointer_t;
    typedef const unsigned char *pointer_to_const_t;
    #define READ_CHAR_ADV(x)    (*x++)
    #define WRITE_CHAR_ADV(x,c) (*x++ = (c))
    #endif
    
    /*****************************************************************************/
    /*                                                                           */
    /* __TI_DECOMPRESS_LZSS() - Decompress data encoded using LZSS encoding.     */
    /*                          Input buffer (inbuf) has the encoded data and    */
    /*                          uncompressed data is returned in outbuf.         */
    /*                                                                           */
    /*****************************************************************************/
    __attribute__((section(".text:decompress:lzss")))
    void __TI_decompress_lzss(pointer_to_const_t inbuf, pointer_t outbuf)
    {
        while (1)
        {
            flags_t flags = READ_CHAR_ADV(inbuf);
    
            int i;
            for (i=0; i<CHAR_BIT ; i++)
            {
               if (flags & 0x1)
               {
                  /*---------------------------------------------------------------*/
                  /* We have an uncoded byte, just write it out.                   */
                  /*---------------------------------------------------------------*/
                  WRITE_CHAR_ADV(outbuf, READ_CHAR_ADV(inbuf));
               }
               else
               {
                  /*---------------------------------------------------------------*/
                  /* Read and unpack the offset and length                         */
                  /*---------------------------------------------------------------*/              
                  offset_t offset;
                  length_t length;
                  
    #if CHAR_BIT == 8
                  offset = READ_CHAR_ADV(inbuf);
                  length = READ_CHAR_ADV(inbuf);
                  offset <<= 4;
                  offset |= ((length & 0x00F0) >> 4);
                  length = (length & 0x000F) + 3;
    
                  /*---------------------------------------------------------------*/
                  /* If the length is 3->17, we only use 4 bits. If the length is  */
                  /* >= 18, we read an additional 8 bits and add it to the length. */
                  /*                                                               */
                  /* If the msb of the second byte is 1, we read an additional     */
                  /* 8 bits and use that for bits 7-14 of the length. This gives   */
                  /* us a range of 3->32785.                                       */
                  /*---------------------------------------------------------------*/
                  if (length == 18)
                  {
                     length_t length2 = READ_CHAR_ADV(inbuf);
                     if (length2 & 0x80)
                     {
                        length_t length3 = READ_CHAR_ADV(inbuf);
                        length2 = (length2 & 0x7f) | (length3 << 7);
                     }
                     length += length2;
                  }
                  
    #elif CHAR_BIT == 16
                  unsigned char temp = READ_CHAR_ADV(inbuf);
                  length = (temp & 0xf) + 2;
                  offset = temp >> 4;
    
                  /*---------------------------------------------------------------*/
                  /* If the length is the maximum value encoded in 4 bits, read an */
                  /* additional 16-bit value and add it to the length.             */
                  /*---------------------------------------------------------------*/              
                  if (length == 17)
                     length += READ_CHAR_ADV(inbuf);
    #endif
    
                  /*---------------------------------------------------------------*/
                  /* If the offset indicates end of data, exit.                    */
                  /*---------------------------------------------------------------*/
                  if (offset == LZSS_EOD)
                     return;                           
    
                  /*---------------------------------------------------------------*/
                  /* Copy the decoded string from sliding window to output buffer. */
                  /*---------------------------------------------------------------*/
                  length_t j;
                  pointer_t pos = outbuf - offset - 1;
                  for (j = 0; j < length; j++)
                     WRITE_CHAR_ADV(outbuf, READ_CHAR_ADV(pos));
               }
    
               flags >>= 1;
            }
        }
    }
    
    
    

    我连续 进入这个环路超过5分钟、环路的长度似乎太高(984)。 这是正常的吗?

    谢谢、
    Alberto

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

    我在完成 for 循环后能够继续、但程序始终位于我之前附加的文件_TI_decompress_lzss ()函数的 while 循环内、 我不知道是否会在任何时候完成、因为我已经进入了快速模式30分钟以上。

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

    Nikolaj、您好!  

    我一直在和你的一位同事交谈、询问是否可以召开会议以便更早地解决问题、因为这项工作在截止日期非常接近的项目中进行。 如果是、您可以通过我的公司电子邮件联系我: aaguayo@metrica6.es

    谢谢、
    Alberto