TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2340R5: Some questions about implementing the sending of ADV data on the rfPacketTx routine of the CC2340R5 chip

Part Number:CC2340R5Other Parts Discussed in Thread:SYSCONFIG

When using the rfPacketTx routine, I discovered an issue. I set a wake-up time of 1 second, and after waking up, data will be automatically sent. However, there is a possibility that this data may not be sent.

Below is my code for this part, along with a picture of the issue.

//
void tx_cfg(void)
{
    /* Initialize and open RCL */
    RCL_init();
    Display_init();
    display = Display_open(Display_Type_UART, NULL);

    rclHandle = RCL_open(&rclClient, &LRF_config);
    /* Set RF frequency */
    rclPacketTxCmdGenericTx.rfFrequency = FREQUENCY_chl37;

    /* Start command as soon as possible */
    rclPacketTxCmdGenericTx.common.scheduling = RCL_Schedule_Now;
    rclPacketTxCmdGenericTx.common.status = RCL_CommandStatus_Idle;

    rclPacketTxCmdGenericTx.config.fsOff = FS_OFF; // Turn off FS

    /* Callback triggers on last command done */
    rclPacketTxCmdGenericTx.common.runtime.callback = txCallback;
    rclPacketTxCmdGenericTx.common.runtime.rclCallbackMask.value = RCL_EventLastCmdDone.value;
}


void tx_service(void)
{
 
        uint8_t *txData;
        
        RCL_Buffer_TxBuffer *txPacket = (RCL_Buffer_TxBuffer *)&packet_t;
        txData = RCL_TxBuffer_init(txPacket, 0, 0, 25);
        
        sendbuf_debug[24] = packet_cnt;
        /* Generate a random payload */
        memcpy(txData,sendbuf_debug,25);

        /* Set packet to transmit */
        RCL_TxBuffer_put(&rclPacketTxCmdGenericTx.txBuffers, txPacket);

        rclPacketTxCmdGenericTx.common.status = RCL_CommandStatus_Idle;

        /* Submit command */
        RCL_Command_submit(rclHandle, &rclPacketTxCmdGenericTx);
    
         /* Pend on command completion */
        RCL_Command_pend(&rclPacketTxCmdGenericTx); 
    
        if(send_cnt>=3)
        {
            send_cnt = 0;
            packet_cnt++;
            usleep(PACKET_INTERVAL);
        }
    
}



Daniel:

您好

已经收到了您的案例,调查需要些时间,感谢您的耐心等待

,

zbin fan:

thank you so much

,

Links:

Hi !

The first step of debugging would be to know if the issue is coming from the wakeup routine or from the radio. Could you try to print through UART in your tx_service function and see if this function is correctly executed every second ?

Another good debugging step would be to see if the radio is actually transmitting any data or not. You can see this by enabling the PA and LNA pins in SysConfig, and checking with a logic analyser when those pins are high or low. If the radio is transmitting every second, then your PA pin should be high every second. You can read about how to enable the PA and LNA pins in the User Guide for the F3 SDK.

,

zbin fan:

Hello, I have used the DEBUG to confirm that the program is fine. Next, I will follow the method you provided to confirm whether the PA pin is at a high level when sending RF data.

Thanks.

,

zbin fan:

well,I added this function according to your instructions, and the oscilloscope showed that some of the RF data was indeed not sent. I guess it is a problem with the configuration struct. Can you provide a detailed configuration process for me to refer to?thank you.

赞(0)
未经允许不得转载:TI中文支持网 » CC2340R5: Some questions about implementing the sending of ADV data on the rfPacketTx routine of the CC2340R5 chip
分享到: 更多 (0)

© 2025 TI中文支持网   网站地图 鲁ICP备2022002796号-1