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.

[参考译文] CC1312R:在4分钟内发送1000字节后停止进入 txTaskFunction

Guru**** 2555260 points
Other Parts Discussed in Thread: CC1312R

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/993330/cc1312r-stop-entering-inside-txtaskfunction-after-sending-1000-byte-during-4-minute

器件型号:CC1312R

大家好、

我有一个基于 cc1312R 的定制板。 我有具有1000字节长度(一个数据包)的 RF_Buffer。  我每8秒将该缓冲器传输到接收器一次。 RF_buffer 仅包含固定数字。

我能够在大约4分钟内发送该缓冲区。 对于一分钟7-8数据包、 完全可以发送28-30数据包。 但之后不再有传输。 因为程序不再进入 txtaskfunction 内部。

下面是我在 TX_TASK 代码中使用的参数。


#define TX_STACK_SIZE 1024

PAYLOAD_LENGTH = 1000

unsigned char rf_Buffer[PAYLOAD_LENGTH+2];

静态 Task_Params txTaskParams;
Task_StructtxTask;
静态 uint16_t txTaskStack[TX_STACK_SIZE];

空 TxTask_init (PIN_Handle inPinHandle)

hpin = inPinHandle;

Task_Params_init (&txTaskParams);
txTaskParams.STACKSIZE = TX_STACK_SIZE;
txTaskParams.priority = TX_priority;
txTaskParams.stack =&txTaskStack;
txTaskParams.arg0 =(UINT) 2;

Task_construct(&txTask, txTaskFuncion,&txTaskParams, NULL);

void txTaskFunction(UArg arg0, UArg arg1)
{
    uint16_t index_2;
    uint32_t RFtime;
    RF_Params rfParams;
    RF_Params_init(&rfParams);

    RF_cmdPropTxAdv.pktLen =  PAYLOAD_LENGTH+2;
    RF_cmdPropTxAdv.pPkt = RF_Buffer;
    RF_cmdPropTxAdv.startTrigger.triggerType = TRIG_ABSTIME;
    RF_cmdPropTxAdv.startTrigger.pastTrig = 1;

    if (!rfHandle){
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    }
    RFtime = RF_getCurrentTime();

    while(1)
    {
        if(accel_time_flag == 1)
        {
            accel_time_flag = 0;

            RF_Buffer[1]=(uint8_t)(PAYLOAD_LENGTH >> 8);
            RF_Buffer[0]=(uint8_t)(PAYLOAD_LENGTH);

            for(index_2 = 2; index_2 < PAYLOAD_LENGTH+2; index_2 ++)
            {
                RF_Buffer[index_2] = index_2-2;
            }
            RF_Buffer[1000]='\r';
            RF_Buffer[1001]='\n';
            RFtime += PACKET_INTERVAL;
            RF_cmdPropTxAdv.startTime = RFtime;

            RF_EventMask result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);

            if (!(result & RF_EventLastCmdDone))
            {   while(1);}
            memset(RF_Buffer, 0, sizeof(RF_Buffer));
            PIN_setOutputValue(hPin, STA_LED,!PIN_getOutputValue(STA_LED));
        }
    }
}

您对此问题有何看法?  4分钟后、它可以阻止哪些内容进入 txtaskfunction。

谢谢你  

BR

Bekir