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.

[参考译文] LP-CC2652RB:TX 802.15.4帧卡滞(无 RTOS)

Guru**** 2446590 points
Other Parts Discussed in Thread: LAUNCHXL-CC26X2R1, CC2652R, CC2652RB, SYSCONFIG

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

https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/1163220/lp-cc2652rb-tx-802-15-4-frame-stuck-no-rtos

器件型号:LP-CC2652RB
主题中讨论的其他器件:LAUNCHXL-CC26X2R1CC2652RCC2652RBSysConfig

你好!

我一直在尝试发送虚拟802.15.4帧、但遗憾的是、器件在运行时卡住:

        RF_EventMask ev = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdIeeeTx_ieee154_0, RF_PriorityNormal, NULL, 0);

更具体地说、是在线路上的 RF_PendCmd  

/* Wait for semaphore */
SemaphoreP_pend(&h->state.semSync, SemaphoreP_WAIT_FOREVER);

下面是我的完整代码:

/*
 *  ======== myradio.c ========
 */
/* For usleep() */
#include <unistd.h>
#include <stddef.h>

/* Driver Header files */
#include <ti/drivers/rf/RF.h>
#include <ti/drivers/GPIO.h>
#include <ti/drivers/UART2.h>
#include <ti/devices/cc13x2_cc26x2/driverlib/rf_prop_mailbox.h>

/* Driver configuration */
#include "ti/drivers/rf/RFCC26X2.h"
#include "ti_drivers_config.h"
#include "ti_radio_config.h"

//our source
#include "debug_utils.h"
//configs
#define PAYLOAD_LENGTH 30
#define PACKET_INTERVAL 500000

//globals
static RF_Object rfObject;
static RF_Handle rfHandle;

static uint8_t packet[0x1E];
static uint16_t seqNumber;



void fill_packet(){
    packet[0] = (uint8_t) (seqNumber >> 8);
    packet[1] = (uint8_t) (seqNumber);
    seqNumber++;
    for(int i = 2; i < PAYLOAD_LENGTH; i++){
        packet[i] = rand();
    }
    print_string("\r\n ====================\r\n");
    print_string("SENDING PACKET:\r\n");
    debug_print_hex_array(packet, PAYLOAD_LENGTH);
    print_string("\r\n ====================\r\n");
}

/*
 *  ======== mainThread ========
 */
void *mainThread(void *arg0){
    //init LED
    GPIO_init();
    GPIO_setConfig(CONFIG_GPIO_0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);

    //init debug
    debug_uart_init();
    print_string("Starting....\r\n");

    //intit RF
    RF_Params rfParams;
    RF_Params_init(&rfParams);
    RF_cmdIeeeTx_ieee154_0.pPayload = packet;
    RF_cmdIeeeTx_ieee154_0.startTrigger.triggerType = TRIG_NOW;
    rfHandle = RF_open(&rfObject, &RF_prop_ieee154_0, (RF_RadioSetup*) &RF_cmdRadioSetup_ieee154_0, &rfParams);
    if(rfHandle == NULL){
        print_string("GOT NULL rfHANDLE!!!");
    }

    int st = RF_postCmd(rfHandle, (RF_Op*) &RF_cmdFs_ieee154_0, RF_PriorityNormal, NULL, 0);
    if(st < 0){
        print_string("FS init failed");
    }

    GPIO_write(CONFIG_GPIO_0, CONFIG_GPIO_LED_ON);
    print_string("Init finished, starting tx\r\n");

    while(1){
        //send packet
        fill_packet();
        RF_EventMask ev = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdIeeeTx_ieee154_0, RF_PriorityNormal, NULL, 0);
        print_string("PACKET SENT, STATUS:\r\n");
        print_rf_event_mask(ev);
        uint32_t cmdStatus = ((volatile RF_Op*)&RF_cmdIeeeTx_ieee154_0)->status;
        print_rf_prop(cmdStatus);
        RF_yield(rfHandle);
        usleep(PACKET_INTERVAL);
    }


    return NULL;
}

有什么想法吗? 我尝试在 TI-RTOS 下运行它、以防出现这种情况、但目前还不幸运。

非常感谢!

e2e.ti.com/.../3718.ti_5F00_radio_5F00_config.he2e.ti.com/.../2705.ti_5F00_radio_5F00_config.c

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

    您好、L S、

    CC2652RB 从未启用过专有射频 支持、因为相应 的设置 尚未在内部进行测试/验证。  这就是为什么在 LP_CC2652RB 文件夹中找不到 prop_RF 示例、或在 Smart RF Studio 7软件工具中找不到 CC2652RB 的专有射频选项。  如果需要专有射频、则不建议使用该器件进行开发、相反、建议评估 LAUNCHXL-CC26X2R1和 CC2652R。  另一种选择是使用 Zigbee、Thread 或 TI-15.4 Stack 示例。

    此致、
    Ryan

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

    您好、Ryan!

    非常感谢您的快速回答。

    我们感到困惑、因为在 SysConfig 中有一个802.15.4选项可供使用、而在 SmartRF Studio 中、我们也成功发送了802.15.4。

    太棒了!

    低侧